Install Samba Server on Ubuntu 7.10 (Gutsy Gibbon)If you want to share files between your Ubuntu and Windows computers,
Run the following command to open the
configuration file, substituting your editor of
This will set Samba to use the smbusers file for looking up the user list. Create a Samba User There are two steps to creating a user. First we'll run the smbpasswd utility to create a
Next, we'll add that username to the smbusers file.
Samba
Server allows you to share the home directories of users automatically.
First, make sure that you've installed Samba server. To share the home directories, open up smb.conf with the following command:
Find this section of the file, and make it match the following:
For example, if the Ubuntu machine is named ubuntuserv, and the username is john, How to share group folders with read only permission
|
sudo mkdir /home/group |
Find this line
... ; security = user ... |
Replace with the following lines
security = user |
Append the following lines at the end of file
[Group] comment = Group Folder path = /home/group public = yes writable = no valid users = system_username1 system_username2 create mask = 0700 directory mask = 0700 force user = nobody force group = nogroup |
Or if you want other network users to be able to edit to the folder then change:
writable = yes |
sudo testparm sudo /etc/init.d/samba restart |
sudo mkdir /home/public sudo chmod 777 /home/public/ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf |
... ; security = user ... |
security = user |
sudo testparm sudo /etc/init.d/samba restart |
Or
2. Append the following lines at the end of file
[public] comment = Public Folder path = /home/public public = yes writable = yes create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup |
writable = yes |
sudo testparm sudo /etc/init.d/samba restart |
sudo mkdir /home/public sudo chmod 777 /home/public/ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup gksudo gedit /etc/samba/smb.conf |
... ; security = user ... |
Replace with the following line
security = share |
Then follow either 1. or 2.
1. Save the edited file.
sudo testparm sudo /etc/init.d/samba restart |
OR
2. Append the following lines at the end of /etc/samba/smb.conf (for a read-only folder)
[public] comment = Public Folder path = /home/public public = yes writable = no create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup |
2. Or if you want other network users to be able to edit to the folder
writable = yes |
2. Save the edited file
sudo testparm sudo /etc/init.d/samba restart |
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup gedit /etc/samba/smb.conf |
Find the following lines
... # printing = cups # printcap name = cups ... |
printing = cups printcap name = cups |
sudo /etc/init.d/cupsys restart |
Now printers working on your Ubuntu machine should be acessible via samba.