Re: Change linux password
| From: | Web Admin | Date: | Tue, 12 Sep 2000 13:20:19 +0000 |
| Subject: | Re: Change linux password | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16349@lists.php.net to get a copy of this message | ||
Hi Yohan,
Yes, your question is not 100% PHP, it's more related to linux and user
access levels. First of all, you mentioned running httpd as root, dont even
think about with without recompiling apache! You can't do that, even
if you define a new user in group 0 (root).
Your question has a long story!! There were people who wanted to execute
commands under root permission. (I remember since 1996!). The only solution
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
(or any group running httpd) and give the write permission for group to
shadow
file (chmod). [Isn't secure for nobody]
Regards,
Ahmad Anvari
----- Original Message -----
From: "Johan Björk" <johan@websidorna.com>
To: <php-general@lists.php.net>
Sent: Tuesday, September 12, 2000 3:53 PM
Subject: [PHP] Change linux password
Maybe this question is not 100% PHP, but it could be.
How do I with Apache and PHP 4+ running under RedHat 5.0, change a users
password in /etc/passwd (shadow)? And I would like to do it without running
the web server as root.
Can PHP force a process to run as superuser somehow and in that way be able
to execute the passwd command to change password, or are there another
command that might be more helpful? If I don't remember wrong this issue
have been discussed somewhere around here before, but it's too long ago for
me to remember.
Thanks!
---
Johan Björk