Crusty
Lifer
I am currently working on the user control panel for my site. I have customers who are renting gaming servers from me, and I do not want to give them shell access to my server so they can restart their server etc etc. They have ftp access so they can change config files and stuff.
I need to be able to login as root into the control panel and create users and be able to change their passwords from there, as well as giving a customer the option to change their password.
I know I can edit /etc/passwd and /etc/shadow through scripts...but I would rather not do that just in case i screw something up. Would their be any way to incorporate using the adduser and passwd commands into a script that would do this?
Edit: Through some googling I got an idea.
If I set up a cron job to run as root that parses the username/password from my mysql table into the passwd/shadow file, but only include users in a certain group, ie only my customers.
Would that be a safer way?
I need to be able to login as root into the control panel and create users and be able to change their passwords from there, as well as giving a customer the option to change their password.
I know I can edit /etc/passwd and /etc/shadow through scripts...but I would rather not do that just in case i screw something up. Would their be any way to incorporate using the adduser and passwd commands into a script that would do this?
Edit: Through some googling I got an idea.
If I set up a cron job to run as root that parses the username/password from my mysql table into the passwd/shadow file, but only include users in a certain group, ie only my customers.
Would that be a safer way?