Click here to Skip to main content
13,055,861 members (49,139 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I need to give complete access to a server to a specific user.

If I grant root access to that user that same user can change the superuser password preventing me to get access to the server as an administrator.

Is there any possibility to create a user that can operate as root but that can't change the root password?

Thank you in advance!
Posted 19-Apr-13 4:54am
Joan M90.6K

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You shouldn't have a user account with root privileges. That's why the root account is not just an elevated user but a special account.

Why do you want root access for a regular user? If you need to admin anything, just use the su command to become root until you're done doing whatever superuser stuff it is you're doing.

If you need to extend access for a user to something you can create a new group using the groupadd command, add the user to this group and change the ownership and permissions on whatever it is you want to give access to to full access for group members.
Joan Murt 19-Apr-13 11:47am
I agree you completely, usually there's no need for a user with root privileges, let's say taht there are two administrators that have to get Access into the server as root (company policies) but they don't have to know the root password, neither be able to change it. This is the reason, usually neither of them will use that account to Access the machine, they'll use it only in case they will have to get administration tasks, but I want to be sure that none of them will be able to change the root password.
A root user can do anything in the system.
Joan Murt 19-Apr-13 11:59am
Yes, I know, but I want to create a user that can do everything that a root can do but change the root password. My exact question in the original post is "Is there any possibility to create a user that can operate as root but that can't change the root password?"
Sorry Joan, i can not help. Good luck.
Joan Murt 19-Apr-13 12:33pm
Thank you for trying!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 19 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100