Friday, December 31, 2010

How to redirect all /etc/passwd user list to your SAMBA User list ? OR, How to add users from your NIS server to SAMBA server ?

How to redirect all /etc/passwd user list to your SAMBA User list ? OR
How to add users from your NIS server to SAMBA server ?


Use below command,

# cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd

Here, /etc/samba/smbpasswd files have user data for SAMBA server.


Now check, All your system users will be added to your SAMBA user list.


What if you are working on NIS Server and you want to redirect all NIS users in to SAMBA server list.
then,

# ypcat passwd | mksmbpasswd.sh > /etc/samba/smbpasswd

IN BOTH THE CASES YOU MUST DO THIS : #chmod 600 /etc/samba/smbpasswd



Done ...

No comments:

Post a Comment