Try: #chage -d 01/01/1970 user Marcos On Mon, Jul 14, 2008 at 2:48 PM, Ben Kevan <ben.kevan@xxxxxxxxx> wrote: > Hi, > > I am writing this because I need to know how to force a password to be > changed > at next login via a useradd script. > > I originally wrote my script on an openSUSE box, which had the passwd -e > argument, however RHEL4 (haven't checked RHEL5) does not have this argument > avaliable. > > In the script I have also tried: > > passwd -f $ACCT (the acct variable is obviously the account name), but that > makes me change the default created password at that time and not when the > user logs in the next time > > another method I tried was: > chage -d 0 $ACCT (again this method let me su $ACCT) without having to > change > the password at all.. (this is not the behavior I want). > > So.. Is there a method I can use that allows what I want? Here is the user > add > portion of my script: > > useradd -u $UUID -g $GID -c "$COMNT" -d $HDIR -s $USHELL $ACCT -p $pass && > passwd -e $ACCT > > The above works in SuSE but not in RHEL due to the lack of -e argument for > useradd. > > All and any help is very greatful. Thank you > > -- > redhat-list mailing list > unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe > https://www.redhat.com/mailman/listinfo/redhat-list > -- ======================================== Marcos Aurelio Rodrigues <deigratia33@xxxxxxxxx> CCNA, MCSO, Security+ Mirabilia laudo semprer, Dei ======================================== -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list