[nycphp-talk] Changing UNIX shadow passwords with PHP
Atul Ohri
atul at monkeyclan.com
Tue Mar 15 16:07:21 EST 2005
Well this is all very helpful. I agree that the safer way to do this would
be through the cron job. I'm looking into various ways to do that and have
yet to find an efficient file locking mechanism that will work for both Perl
and PHP.
But a bigger problem I'm having is that because my server is using Virtual
Hosts I haven't figured out how to use the usermod function to change
passwords. Basically if a user has a username of "foo" on the "bar.com"
domain, usermod would require the username parameter to be "foo at bar.com".
But that doesn't work because the /etc/shadow that is in the virtual
directory for the bar.com domain just has "foo" as the username.
I guess the smartest way around this would be to manually process the
/etc/shadow file instead of using usermod.
Atul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20050315/297f8f3f/attachment.html>
More information about the talk
mailing list