Re: How to add user to linux using php
| From: | Ruben Rubio | Date: | Tue, 05 Sep 2006 06:33:20 +0000 |
| Subject: | Re: How to add user to linux using php | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-241362@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
1) You can configure nobody (apache/php user) to log with ssh key
verification (You do not need to write a password) So you can execute
"ssh root@localhost" and you can login without write any password.
2) Configure a php that execute a perl script with username/password as
parameter. (You should very carefully check that the parameters are only
characters with no estrange characters there)
3) Use Perl module Net::SSH to log as root in localhost and execute
adduser command.
Note: You can be a little bit secure if you create an user that has
enough privileges to execute adduser, and instead login as root with ssh
key verification log as that user.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE/RowIo1XmbAXRboRAiX8AKCQyviGYZQdGNw9Qgld+rhgD/9xqQCgkNa4
w9QLmo8b6VIIZtdMo0cI8tU=
=6YaW
-----END PGP SIGNATURE-----