1. 1. add linux user : - add to existing group # useradd -g account ammar # passwd ammar or -add user anf create new group # useradd ammar # passwd ammar # 2. modify user home dir,shell, group # usermod -d /home/users ammar # usermod -s /sbin/nologin ammar - set user primary group # usermod -g account ammar - add groups to use # usermod -G users,account ammar 3. check uid status # id ammar 4. remove user & his home dir userdel -r ammar 5. add / remove group groupadd anis groupdel ammar 6. add sambar user # smbpasswd -a ammar 7. add user to samba config : # vi /etc/samba/smb.conf [planner] comment = Planner path = /home/planner writeable = yes create mask = 0775 directory mask = 0775 force user = root force group = planner valid users = fatin, ammar, syakir, luqman, anis ; browseable = yes 8. restart samba : # service smb restart or # /etc/init.d/smb reload Automount samba whe boot up : 1. edit fstab file : # vi /etc/fstab proc /proc proc defaults 0 0 /dev/hdb1 / ext3 defaults,errors=remount-ro 0 1 /dev/hdb2 none swap sw 0 0 /dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0 //ntserver/docs /mnt/samba smbfs username=docsadm,password=D1Y4x9sw 0 0
My personal experience as a programmer, system admin and database administratror.
Tuesday, June 11, 2013
Add New user to samba
Add New user to samba :
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment