LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   need help (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-705522/)

scream 02-17-2009 10:05 PM

need help
 
Dear All,
I want to config my system such way that if anyone tries to change my root password then system will automatically mail the new password to system admin. is it possible? please let me know how..........................

Drakeo 02-17-2009 10:52 PM

Quote:

want to config my system such way that if anyone tries to change my root password
mail the new password to system admin.
well root is the admin. most of the time if you are root then how could the system email you a new password. to admin. do you understand what I am saying.
or are you trying to say if some one mess with your password you want the system to lock it out and issue a new password that only an root admin can get.
why even have a password then. most system just lock that user out till it is restarted. But since your root. who knows who admin is I guess root. or did you as root set up another user with admin and root privileges.
Enough you are not root on the system the admin is and you will have to ask your admin to set up a system that generates passwords. find a good linux script writer and send him to your admin so so your admin that has root privileges of your computer can allow this.
that why admin support gets all the big dollars.
Quote:

Here at the U of I all staff people that work with personal data get a new password given to them every 3 month or less.

linuxlover.chaitanya 02-17-2009 11:36 PM

If you are the root then only person who can change root password is YOU. Unless you tell your password to someone else or that person has physical access to the system. For preventing someone from booting into single user mode use boot loader password so that no one is able to change the parameters at boot loader. All said there are several other ways that can compromise your system.
So keep your root password secret and keep changing it at regular intervals.

servat78 02-18-2009 05:00 PM

The root password is usually changed by the 'passwd' program. It is possible to create other applications to change passwords, but most of these would propably call 'passwd' to do the job. If you always want to be notified on some email address about root password changes, then you will need to create your own version of 'passwd'. Possibilities are:

- modify the passwd source code to send notification mails and compile it again

- rename the passwd tool to something else (maybe passwd.exe) and create a shell script named passwd that actually runs the original passwd tool, but additionally sends a notification

Note that the /etc/passwd and /etc/shadow files can also be changed directly with some text editor and the password hash value can be inserted by copy-pasting it. So nothing guarantees that the passwd tools really comes into play. If this whole attempt is against malicious attacks to the server, then be aware that after intrusion none of your tools can be trusted.

Debian


All times are GMT -5. The time now is 04:53 PM.