Adding users to samba

Add user to linux user with command below

useradd peter
passwd peter
New password: *******
Retype new password: ********

smbpasswd –a peter
New SMB password: ********
Retype new SMB password:********

Add a user to a Samab share
By default user gets access to /home/peter from windows system. Let us say you want to give peter access to /data/accounts (make sure directory /data/accounts exists) directory. Open /etc/samba/smb.conf file and add/modify share called [accounts]:

comment = Accounts data directory
path = /data/accounts
valid users = user1 user2 peter
public = no
writable = yes

save the file

restart samba: service smb restart

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Stop / disable iptable

# /etc/init.d/iptables save# /etc/init.d/iptables stop

Tar and untar directory

To tar and gunzip directory tar -pczf backup.tar.gz directoryname/ To untar and unzip directory...

How to flush iptables blocked IP

Check iptable status:   service iptables status iptables rule store at: cat...

Check CentOS Version


Powered by WHMCompleteSolution