Please do not ask why, but is it possible to do it?
p/s: I know it's not a good thing, let's just say someone from the top management who is computer illiterate want some sort of control over the server.
|
Please do not ask why, but is it possible to do it? p/s: I know it's not a good thing, let's just say someone from the top management who is computer illiterate want some sort of control over the server. |
|||||||||||||||
|
|
Don't do that... you can either give them root's password or you could execute |
||||
|
|
|
If that user has sudo access then sudo passwd root dose the work. If we don't have sudo access then it'll prompt for the password again. If we know the password the work can be done. |
|||
|
|
|
If your system used pam_tcb (tcb - the alternative to /etc/shadow) (and hence there were users' password files per user), you could also achieve what you want by managing file permissions and groups (say, add this user to the group that you make own the password file for root). In this case, I don't see any principal differences in the results as compared to the But in other cases, |
||||
|
|
|
If you don't trust the owner of the root account then there's probably no way to prevent that root user from removing this special permission. If you do trust the root user then just ask him for the current password. |
|||
|
|
|
If you trust that user so that he has permission to change root password, it should be safe to give him the current root password in the first place. |
|||
|
|
|
Can't he use run level 1 to change root password? What I have in mind is
The obvious disadvantage of this procedure is that machine has to be rebooted and while its in run level 1, it will be offline. Kindly mention the flaws that you find in this procedure. |
|||
|
|
|
Maybe you can add this line to the sudoer file (using
I don't know if that breaks your condition of a "normal user", though, because after that he/she has so much power. EDIT: as per xenoterracide's comment :) |
|||||||
|
|
To see how this might be enabled, here's a related example from the sudoers(5) manpage.
You'll have to invert the logic to achieve your ends, of course. So, you would execute the
to |
|||
|
|