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 ...

Comments

Popular posts from this blog

Recover or restore initramfs file in RHEL or CentOS 7

Space reclamation / UNMAP on RHEL or CentOS 7

How to recover /boot partition on RHEL or CentOS 7?