Server Topic
   >  Introduction to Samba
   >  Installing Samba
   >  Samba Daemons
   >  Configuring Samba
   >  Verifying Samba Config
   >  Adding Samba Users
   >  Mapping Client Users
   >  Windows Client Config
   >  Linux Client Config
   >  Troubleshooting Samba

 

Adding Users to Samba / CIFS

Adding Samba Users

Once the /etc/samba/smb.conf file been configured, if the users/passwords on the client PCs differ from those on the Samba server then you'll need to add all the users from the client machines that will be connecting to the share(s). If you don't do this, the users on the clients will need to logon to the Samba server using a valid server user/password each time they connect to the share.

To do this, first add a user on the Samba server (-assuming one doesn't already exist) with the same name as that on the client with the following syntax:

sudo useradd -s /bin/true <remote username> (-create Linux user without shell access)

Once created, set the password for the new user to the same value as on the client using the following commands:

sudo smbpasswd -L -a <remote username> (-create Samba user with same name)
sudo smbpasswd -L -e <remote username> (-enable Samba user just created)

You will be prompted for a password: use the same password as that user has on the client. This is so the client can connect without being prompted for a specific user and password.

Note: try and keep the Linux and Windows users the same if possible. The object is to end up with the same users/passwords on the server as on the connecting clients



HomeSite IndexDesktop GuideServer GuideHints and TipsHardware CornerVideo SectionContact Us

 sitelock verified Firefox Download Button