(debian) etc/security/limits.conf maxlogins
My goal is to limit the root user to one login on the system.
I appended a line to /etc/security/limits.conf file Code:
root - maxlogins 1 Code:
root soft maxlogins 1 Code:
root hard maxlogins 1 What is going on? Why am I still able to have simultanious root logins on my machine? PS, No other additional configurations are in the file. PPS, I decided to add a new line to prevent the only non-root user from multiple logins the same way and it works. It would appear this rule is not being applied to root for some reason. Please give me some insight. |
Code:
man limits.conf Code:
maxlogins |
uid=0 of course meaning the root user (or any bogus other users idiots create with the same uid 0 thinking it somehow protects them from just giving out the root password).
|
Thanks for the responses. Is there a way to effectively enforce this limit on the root user?
|
You might want to investigate use of /etc/securetty (man securetty to see details) as a more reasonable way of controlling root access by device rather than by number of logins.
If you restrict root login to the console and setup sudo to allow only certain admins to do "sudo su -" to become root you might more effectively both control who becomes root and log who does. |
All times are GMT -5. The time now is 12:41 PM. |