we have a need to disable login except for root and another ID. Does anyone know an easy way or is it even possible? Don't want to expire the password either.
To those reply to this message, thank-you in advance.
Although it's not elegant, you can insert a test in the /etc/profile script to look for the username and exit if it isn't "root" (or a few select others).
If the exit doesn't log the user out, you may have to take it a step further and kill the current process by PID number.
I've performed similar tasks if a Client just wants to limit the system during a period of time.
Be careful if you play with /etc/profile, as a mistake could render the system inaccessible.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.