Simon Murcott simonmu at
Fri Mar 26 01:45:45 GMT 1999

On Fri, 26 Mar 1999, Cabler, Adam W wrote:

> Is there a good way to keep (and start) your smbpasswd file in line with
> /etc/passwd?  mksmbpasswd was not included in the cvs release that I have. 
> Does it still work?  If so I can get it somewhere.  If not, is there a
> new/better way?

Try this:

for item in `cat /etc/passwd | awk -F: '{print $1}' | sort`
  grep ${item} /usr/local/private/smbpasswd
  if [ $? -ne 0 ]
    smbpasswd -a -n -e ${item}

This will add missing entries into the smbpasswd file with NO PASSWORD.

You will need to organise whatever password changing system you have in 
place to also use smbpasswd.

Hope this helps.


Simon Murcott

 Optimation New Zealand Limited
 Exchange Place, Willeston Street, Wellington, New Zealand
 Phone +64 4 4727218, Fax +64 4 4727219 
 S.Murcott at
 Man will occasionally stumble over the truth,
 but most of the time he will pick himself up and continue on.

More information about the samba-ntdom mailing list