Is there any function to change password without verification, when process is run by root.
Or any way to add user with password, without interacting.
I want to add user from web interface.
Is there any function to change password without verification, when process is run by root.
Or any way to add user with password, without interacting.
I want to add user from web interface.
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.
That's really true. Another interesting thing is that the confidence o say so easily. But doing is much more complicated.
Move 20 mins to your ref.. Did not find any turning point to solve the problem. I will be checking your resources with more time.
Here I'm going to explain more.
I wanted to make a web interface,
think signup.cgi is the file which has followgin permission:
-rwsr-sr-x 1 root nogroup 90908 Dec 15 22:58 signup.cgi
system("/usr/sbin/useradd -d /home/client/nilu -s /bin/mail-pass -p "Passwd9NEU" nilu");
I wanted to do this from that cgi file in C.
Giving error:
useradd: unable to lock password file
Can anyone help me to go ahead?
Last edited by zahid; 12-15-2002 at 11:58 AM.
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.
http://www.rt.com/man/passwd.1.html
check out http://www.rt.com/man/
for more commands
Asking the right question is sometimes more important than knowing the answer.
Please read the FAQ
C Reference Card (A MUST!)
Pointers and Memory
The Essentials
CString lib
I solved the problem temporarily through a loop (each 5 second) process by root. This is much more secure. Though I don't think security is a problem even if that signup.cgi could do that. Ohh. I need encryption of passwords. char *crypt(const char *key, const char *salt); needs lots of library files.
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.