[Samba] change password on 1st signon

Chris smb23 at realcomputerguy.com
Tue Aug 29 14:58:48 GMT 2006


On Tuesday 29 August 2006 00:56, fname lname wrote:
> oh, last thing is there a way to make this setting default so
> everything I create an user it auto flags the person to change
> password on signon?

Just make it part of your script that adds users.

I use this script which allows me to add as many users as I need to at 
one time:
-------------------------
#!/bin/sh
cat newusers |
while
read x z
do
useradd -c "$z" -g "users" -m -k "/etc/skelnul" -p $x -s /bin/false $x
echo -e "$x\n$x" | smbpasswd -a -s $x
pdbedit -u $x --pwd-must-change-time 0 &>/dev/null
done
-------------------------
The file newusers is space delimited with the <username> followed by 
the 'User's Name', ex:

twoods Tiger Woods
worst George W. Bush
bgates Billy Gates

etc.

Edit the script for your own needs.

Chris




More information about the samba mailing list