Passwords
Simon Murcott
simonmu at optimation.co.nz
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:
#!/bin/bash
for item in `cat /etc/passwd | awk -F: '{print $1}' | sort`
do
grep ${item} /usr/local/private/smbpasswd
if [ $? -ne 0 ]
then
smbpasswd -a -n -e ${item}
fi
done
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.
Regards
Simon Murcott
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Optimation New Zealand Limited
Exchange Place, Willeston Street, Wellington, New Zealand
Phone +64 4 4727218, Fax +64 4 4727219
S.Murcott at optimation.co.nz
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Man will occasionally stumble over the truth,
but most of the time he will pick himself up and continue on.
-Churchill
More information about the samba-ntdom
mailing list