If you wish to restrict the maximum number of login sessions for a specific user, you can do this by modifying the .profile of that user:
A=`w| grep $LOGNAME | wc -l`This example restricts the number of logins to three. Make sure the user can't modify his/her own .profile by restricting access rights.
if [ $A -ge 3 ] ; then
exit
fi
If you found this useful, here's more on the same topic(s) in our blog:
- Log file rotation script
- Logical volumes with customized owner / group / mode
- A quick way to remove all printer queues
- Restoring a mksysb of a mirrored rootvg to a non-mirrored rootvg
- Accessing ILO through SSH tunnelling
UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.
Interested in learning more?
Interested in learning more?



