It occurred to me a few days ago that for most of my work I don't need a lot of the elevated permissions that I like to retain for my system. I do a lot of my work remotely via ssh, and I don't like how a compromise of that login would compromise my system, so I decided to give myself a second username with the same uid, home directory, etc. The only differences are the passwords, the groups, and the MAC labels. My "normal" user is part of all of the necessary groups for getting work done and has a less-restrictive set of MAC labels. My "admin" user is part of the wheel group, and has a more-restrictive set of MAC labels.
There are some complications that come along with this, however.
Just wondering if anyone else does this, and/or if anyone knows of additional security risks involved. I think at worst it would be just like a compromise to the "admin" username, but hopefully trickery isn't the only thing this technique has going for it.
Thanks!
Kevin Barry
There are some complications that come along with this, however.
- To change the password of the second account, you need to explicitly provide that username to passwd, but it doesn't require you to be root. This isn't much different than using the "toor" account, however.
- The pam_self.so module causes a serious security hole because you can su/login from the "normal" user to the "admin" user, thereby changing groups, without so much as a password prompt. This can be solved by commenting out the pam_self.so lines in /etc/pam.d/*, however.
init 1
to bring the system back up. I'd also like to be able to restrict login of the "admin" user outside of the LAN, but unfortunately the sshd options to control such things are somewhat obtuse.Just wondering if anyone else does this, and/or if anyone knows of additional security risks involved. I think at worst it would be just like a compromise to the "admin" username, but hopefully trickery isn't the only thing this technique has going for it.
Thanks!
Kevin Barry