How a non-root user sudo to another non-root user without password?

uzumaki

New Member
Joined
Dec 15, 2021
Messages
2
Reaction score
0
Credits
17
I need to grant sudo access to non-root user1 to sudo su - user2(non-root) without granting user1 root privilage. Please help me.
 


If user 1 isn't root and doesn't have sudo rights, I don't think they can add user2 to the sudoers file. Its not clear what you are asking though.
 
I need to give sudo access to user1 to sudo su - user2 without having root previlage
Your mistake is wanting to use sudo yet not allow root privileges. Forget sudo. The su command is all you need to allow user1 to have access as user2.... but user1 MUST know user2's password, or else this would be an unacceptable security risk to user2. You may want to use " su - " or " su -l ".... see usage details and examples of the su command below:




 
I'm not looking for adding/ creating user. I need to give sudo access to user1 to sudo su - user2 without having root previlage

If you give user1 sudo access, they will be able to use sudo to run anything as root.

If user1 knows user2’s password, they should be able to just use su. There’s no need for sudo, unless access to su has been restricted.
 

Members online


Top