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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

to restrict no of logins per user

Status
Not open for further replies.

sclganesh

IS-IT--Management
Nov 17, 2002
11
IN
I would like to restrict no of logins per user as 2.
Kindly help.
 
Hi:

Assumingg LOGNAME is set, how about placing this line in /etc/profile:

[ `w -h -s| cut -d" " -f1 | grep "^$LOGNAME$" | wc -l` -gt 2 ] && exit 0

 
Thank you very much. The script is working OK.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top