Forcing users to change password at login - Probably "Again" | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
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
[Home] [CentOS] [Kernel List] [Red Hat Install] [Centos] [PAM] [Fedora Users] [Red Hat Development] [Red Hat Enterprise Linux] [Red Hat 9] [Centos] [Big List of Linux Books] [Linux Admin] [Photo Sharing] [Hot Springs] [Gimp] [Asterisk PBX] [Yosemite News] [Red Hat Crash Utility]
![]() |