Operating System - Linux
1823143 Members
3568 Online
109647 Solutions
New Discussion юеВ

temp login with root access right

 
SOLVED
Go to solution
hangyu
Regular Advisor

temp login with root access right

I want to create a login which has the SAME permission as root user , what can I do ? thx

p.s. the reason to create this ID is I want to send the ID to non-IT user ( remote site ) to run some script , and I will delete this ID after use .
2 REPLIES 2
Zeev Schultz
Honored Contributor

Re: temp login with root access right

Use sudo. Create temporary user and edit comands/actions that this user need in /etc/sudoers. Read man page for sudoers and sudo for more details.

Another approach would be creating ssh (ssh2) public key for the root and giving it to your remote user. Obviously you need to set up public key only logins in sshd. This way your remote user can connect without using password.

Sudo option is more restrict and controllable though.
So computers don't think yet. At least not chess computers. - Seymour Cray
Alexander Chuzhoy
Honored Contributor
Solution

Re: temp login with root access right

although it's not recommended for security issues you can add a user with uid and gid 0
and it'll act as additional root on the system.
You can also add a regular account, modify the /etc/sudoers file (with visudo utility) and add just the commands that are required by that non IT user, which is a better way (again for security).