Does anyone know how to add a user from PHP page to Linux server? I tried using system("useradd username"); and system("./useradding") executing a shell script but both method fail me is that because i must write some code to login in as root before this can be done?
Yeah, you need to have permissions to do that. May be easier to use PAM Authentication....
The reason you can't run useradd as a shell command from a Web server is that it's a VERY bad idea. It opens a big security hole. The entire Unix permissions system is designed to stop this very sort of thing from happening.
yeah, but if someone wants to do it, they want to do it right? 🙂
and yeah, php would have to be running as root. :eek: lol
thank for all the comments does can anyone show me php code of how to start up as root level