php4.2.3 apache mod
linux rh7.2

I am trying to add unix system account user via a simple php and shell script
system("/usr/bin/ timtom752002 timtom752002 /home/timtom752002",$r) or die (" $r 
creation fail");

print "success";

when i ran add.php on my browser, i get
 254 user creation fail

I created my file in /usr/bin and I have setuid it:
-rwsr-xr-x    1 root     devel         216 Sep 18 08:54

It looks like:

# create user
/usr/sbin/useradd -m -d $homedir $username

# change the password
echo $password
sleep 1
echo $password
sleep 1
echo $password
)|passwd $username

When I ran the from the command line, it works ok:
$ /usr/bin/ nnnnn nnnnn /home/nnnnn
Changing password for user nnnnn
passwd: all authentication tokens updated successfully
(i tried login in with uid=nnnnn and passwd=nnnnn and it was ok)

What's wrong with those scripts. It DOESN'T even create the user timtom752002. Please 


Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to