Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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.
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.