Re: Change linux password

From: Date: Tue, 12 Sep 2000 14:23:53 +0000
Subject: Re: Change linux password
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16368@lists.php.net to get a copy of this message
At 17:50 12/09/00 +0430, Web Admin wrote: >Hi Yohan, >Yes, your question is not 100% PHP, it's more related to linux and user <snip> >we finally found, was to write command into a file and let the cron run the >commands every 1-2 minutes. Another way is to chgrp shadow file to nobody using 'at' moght be a bit neater than cron. >(or any group running httpd) and give the write permission for group to >shadow >file (chmod). [Isn't secure for nobody] >Regards, >Ahmad Anvari Why not create a program to do the relevant changes (and make some security checks - like not changing a system (root, tftp, adm, ...) password) and chown root, chmod u+s it. It should then run with root permission from PHP using 'exec' or similar. This will also allow you to to look at its output which is a lot more difficult if you run it in a seperate session using cron / at. If you have PAM installed, this is relativley easy to do. JUST MAKE SURE THAT THIS IS REALLY WHAT YOU WANT TO DO!!!!! Writing programs to mess with your password file can seriously damage your system security. Colin

« previous php.general (#16368) next »