cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd
If the system uses NIS, type the following command:
ypcat passwd | mksmbpasswd.sh > /etc/samba/smbpasswd
The mksmbpasswd.sh script is installed in your /usr/bin directory with
the samba package.
Change the permissions of the Samba password file so that only root
has read and write permissions:
chmod 600 /etc/samba/smbpasswd
Thanks,
Naresh