Operating Systems > Linux and UNIX

apache help

<< < (3/4) > >>

Stryker:

quote:Originally posted by void main:


Did you do it with suexec?
--- End quote ---


nope, it's sudo... i looked at the /etc/sudoers and it explained what i needed.

You have any idea how i can go about encypting the password so that it will work with useradd -p?

voidmain:
Why not just add the user with "adduser" and set the password with "passwd"? Something like:

echo "$password" | sudo /usr/bin/passwd --stdin $username

[ November 02, 2002: Message edited by: void main ]

Stryker:

quote:Originally posted by Ex Eleven / b0b 2.1:
Id make a PHP script if i was doing that!
--- End quote ---


i'm on a perl page now and am having problems... this is what i have.

system("echo","$form{'pass'}","|","sudo","passwd","--stdin","$form{'user'}");

nevermind... i got it now... sorry

[ November 02, 2002: Message edited by: Stryker ]

voidmain:

quote:Originally posted by Stryker:
system("echo","$form{'pass'}","|","sudo","passwd","--stdin","$form{'user'}");

--- End quote ---


You should just be able to do:

system("echo \"$form{'pass'}\" | sudo passwd --stdin   $form{'user'}");

[ November 02, 2002: Message edited by: void main ]

Stryker:

quote:Originally posted by void main:


You should just be able to do:

system("echo \"$form{'pass'}\" | sudo passwd --stdin   $form{'user'}");

[ November 02, 2002: Message edited by: void main ]
--- End quote ---


yeah... i figured that out right after posting.

In the past i've had commands not work that way though, so i didn't think of trying. well, thanks for the help.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version