Please see this


Contents

- INDEX
- Unix Scripts Index
- HP-UX
- Solaris
- Linux Index
- General Unix
- Unix Networking
- Other Unix types
- Unix databases

Associated Information

- none

Restrict number of logins allowed for a user

To restrict multiple logins, place the following lines in the users .profile

# Limit number of logins allowed Times_allowed=2 Time_in=`who | grep $LOGNAME | wc -l` if [ $Time_in -gt "$Times_allowed" ] then echo "$LOGNAME is already logged in $Times_allowed times!" exit exec /bin/login fi

Then chmod 444 and chown root .profile


Copyright 2000 Intronet Computers Ltd
Email: Intronet Computers for enquiries