Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey,
I know this has been asked a million times, but it hasn't provided a resolution for me. I'm new, and ignorant with terminology, but I'm eager to learn.
THE POINT
I wanna be able to allow people to create a webspace on my server. FTP/Web Account, and email. I'm using a php form, posting to a cgi script.
...
system ("/usr/bin/sudo -u bob /usr/sbin/adduser $userid -c '$f_name $l_name' -p $password");
I have "bob" in the sudoers file as "bob ALL=(ALL) ALL"
I keep getting adduser: unable to lock password file. Can someone please tell me what that is and why I'm getting it and how to resolve it. I deleted the .lock files too. I'm going nuts.
My guess (and it's more a guess here than anything else) is that bob needs to be authenticated before changing the file. (I don't see how you are typing in a password here) And because that authentication uses the password file, you cannot lock it to then change it.
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# User privilege specification
root ALL = (ALL) ALL
apache ALL = (ALL) NOPASSWD: /usr/sbin/adduser
i tried adduser and /usr/sbin/adduser
either way it says the same.. "adduser: unable to lo
ck password file"
I searched and deleted any .lock files. I don't have any..
system ("/usr/bin/sudo -u apache /usr/sbin/adduser $userid -p $password");
i've been taking out flags to minimize errors.. no luck..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.