LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   root change the password (https://www.linuxquestions.org/questions/linux-security-4/root-change-the-password-50288/)

Rex_chaos 03-17-2003 11:10 AM

root change the password
 
Hi all,
Being a root, sometimes I must change the password for a general user. However, I always forget to input the username so what have been changed is the password of ROOT!!!

I wonder if there is a way to warn the root whenever the password being changed is of ROOT???? And I also want to send a mail containing the original password and the new password for notification after every change the password.

HOW ???????


Thanks in advance.

acid_kewpie 03-17-2003 11:18 AM

i don't think this is possible, the whole point is that root knows all, and has to be held responsible for doing dumb things. as for sending email, that is a horrendous security risk, and lucky impossible as the actual passwords are not stored anywhere, only the encrypted version, which is no use to anyone.

Rex_chaos 03-17-2003 11:24 AM

Thanks for your reply.

So can i prevent the root from changing the password of itself.

unSpawn 03-18-2003 04:31 PM

No, you can't. Else it wouldn't be a root account.

//Just to make this thread complete.

RCampbell5 04-11-2003 02:07 AM

A couple of thoughts on the matter. One is to have the user id in the prompt, this works for me. Another is create a script named something that makes sense to you that will print to the screen that you are root and ask for the user id you wish to modify. It would capture your response and run passwd with the user id you provided.


All times are GMT -5. The time now is 09:29 AM.