Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Password lock/unlock question

0 views
Skip to first unread message

Nader Soliman

unread,
Aug 24, 2001, 11:39:01 AM8/24/01
to
If a user account is locked due to too many attempts to login, root does not
unlock that user accounts from the command line, using passwd -u. Also
passwd -s does show that the user account is locked. Only when the account
is locked for admin purposes, we are able to unlock the account or show the
status from the command line. Do I have to use "scoadmin a" all the time?


Jeff Liebermann

unread,
Aug 26, 2001, 1:22:34 AM8/26/01
to

Nope. Try this script and use it as the basis for making some kind of
unlock script. However, I would be curious as to why someone exeeded
the failed login limit.

:
# @(#) lock+bagels. Reports login and tty C2 locks.
# by Jeff Liebermann 03/12/95
#
# test for user login locks
cd /tcb/files/auth
users=`find . -type f -print` # get list of users.
for i in $users # for each user.
do
if (grep ':u_lock:' $i > /dev/null ) # any acct locks?
then # tell someone
echo "Acct: `basename $i` is locked"
fi

if (grep ':u_type=retired:' $i > /dev/null ) # is the account
retired?
then # tell someone
echo "Acct: `basename $i` is retired"
fi
done

:
# test for tty locks?
if (grep ':t_lock:' /etc/auth/system/ttys > /dev/null)
then
# get the ttys with the locks
echo "Terminals:`grep ':t_lock:' /etc/auth/system/ttys \
| cut -d: -f1`\nare locked"
fi


--
Jeff Liebermann 150 Felker St #D Santa Cruz CA 95060
(831)421-6491 pgr (831)426-1240 fax (831)336-2558 home
http://www.LearnByDestroying.com WB6SSY
je...@comix.santa-cruz.ca.us je...@cruzio.com

0 new messages