Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking Users Out

Status
Not open for further replies.

rjgreen

Technical User
Oct 2, 2002
14
US
Is there a way to lock all users out except for one and the root user of an AIX 4.3.3 server while application maintenance is ongoing?

Thanks for your help

RJG
 
You can do this by creating /etc/nologin file - this will prvent ALL users logging except for root. this file is remove when reboot or you can allow users to log back by deleting the file.

when we do maintenance we have is a script to disallow user from logging in to the db but still can get into the apps menu prompt. we have 2 scripts named putin_nologin & remove_nologin
putin_nologin is run b-4 maintenance the contain of the script is as simple as the below
cp symtem_down nologin_xxx , where xxx is the name db

after maintenance remove_nologin is run
rm nologin_xxx , where xxx is the name of the db

also you might want to expirement the Attributes 'login' in the /etc/security/user
 
Here is the script I use for preventing user login.
put the user names you want to prevent in a file 'list' , each name in a line.
then run the script below;

for i in `cat list`
do
BAAN_USER=$i
echo $BAAN_USER
chuser account_locked='true' $BAAN_USER
done

and for let them login run;
for i in `cat list`
do
BAAN_USER=$i
echo $BAAN_USER
chuser account_locked='false' $BAAN_USER
done

Baanman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top