Instead of opening up your /etc/sudoers file to allow users to “sudo up to root”, just add one file per user in /etc/sudoers.d/. One file per user or just put them all in one file. Your call.
Create a user called “test”.
Then, to allow that user to be able to log in to the “root” account, do this:
nano /etc/sudoers.d/test
Then paste in this:
test ALL=(ALL) ALL
Then, after you log in with that “test” user, type this to “sudo up to root”:
sudo -H -s
After typing in the “test” user password again, you will be logged in as “root”.
No comments:
Post a Comment