I have a main
user with home folder encryption enabled. To avoid typing long phrase each time I want to have another user with sudo privilege and weak password.
In the terminal I would first switch user to further do any admin work
main@machine$:su test
password:{entering weak password fast}
test@machine$: sudo some action
[sudo] password for test: {entering weak password fast}
I want user test
to be unable to login under any condition and that is:
- After OS start or reboot user
test
should not be displayed, and GUI exit to terminal (Ctrl+Alt+F3) should also not allow to login withtest
- After
main
user with encrypted folder login, and lock session, usertest
should not be able to login by any means - Any other condition unknown to me, the
main
home is decrypted and I don't want any other users to access the system and thus access the files
Bonus: Ideally if another user did login, the main
should auto log out to protect it's home
Please note an answer like: "disable password for sudo for main user" is not a viable solution. Reason: if left machine unattended without locking the session, I don't want someone ability to sudo without password, a weak password from other user will give me time to come back :)