Install Samba Server in Ubuntu
Install Samba Server in Ubuntu
First you need to Edit the smb.conf file using the following command
sudo vi /etc/samba/smb.conf
In the global section, remove the “;” at the front of the line security = user so it looks like this
security = user
Create the directory for sharing the files and change the owner to the users group.
mkdir -p /home/shares/allusers
sudo vi /etc/samba/smb.conf
[allusers]
comment = All Users
path = /home/shares/allusers
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes
If all users shall be able to read and write to their home directories via Samba use these
Edit the /etc/samba/smb.conf file
vi /etc/samba/smb.conf
Now you need to restart the samba server using the following command
/etc/init.d/samba restart
In this example, I will add a user called nyc. You can add as many users as you need in the same
way, just replace the username tom with the desired username in the commands.
Set a password for nyc in the ubuntu system user database. If the user nyc shall not be able to
login to the ubuntu system, skip this step.
passwd nyc
smbpasswd -a nyc
Now you should be able to log in from your Windows workstation with the file explorer using
username nyc and the chosen password and store files on the ubuntu server either in nyc’s home
directory or in the public shared directory.