Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Linux
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 5:54am
Joan Murt82.9K

1 solution

Rate this: bad
good
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.
  Permalink  
Comments
Joan Murt at 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.
José Amílcar Ferreira Casimiro at 19-Apr-13 11:52am
   
A root user can do anything in the system.
Joan Murt at 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?"
José Amílcar Ferreira Casimiro at 19-Apr-13 12:04pm
   
Sorry Joan, i can not help. Good luck.
Joan Murt at 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
0 OriginalGriff 280
1 Jochen Arndt 150
2 Kornfeld Eliyahu Peter 120
3 PIEBALDconsult 110
4 Richard MacCutchan 105
0 OriginalGriff 6,055
1 DamithSL 4,621
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,500
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 19 Apr 2013
Copyright © CodeProject, 1999-2014
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