Re: Re: [PHP] passwd commandÆÐ½º¿öµå ÀÚµ¿È­

From: Date: Fri, 18 Aug 2000 02:06:11 +0000
Subject: Re: Re: [PHP] passwd commandÆÐ½º¿öµå ÀÚµ¿È­
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12392@lists.php.net to get a copy of this message
This is shell script running in the internal system not webserver. This will be run as root by Cron. #! /usr/local/bin/php -q <? function passwd($user, $new_passwd,$re_passwd) { $passwd = $new_passwd."\n".$re_passwd; system("echo $passwd | passwd $user"); // converation error } passwd($argv[1],$argv[2],$argv[3]); ?> I want to resolve the conversation error generated from my source. I have my own password-chager in C . so, I have run it. <? ... ... system("./passwd_C $user $new_passwd $re_passwd"); ... ... ?> But I want to know whether PHP will execute this command through '/bin/passwd' tool. When there is run /bin/passwd tool, passwd dudeson New user password: <prompt> <--- php limitation Retype new user password: <prompt> <--- php limitation that is, php can't process this prompt > tried this, and I got a conversation error. I think you'll have to write > your own password-changer in C or find one. > > By the way, if your webserver is running as root, you have a security > problem. It should run as 'nobody' or some other user. > > Dean. > > ----- Original Message ----- > From: "Caldera OpenLinux User" <dudeson@slug.sogang.ac.kr> > To: <dudeson@slug.sogang.ac.kr> > Cc: "PHP" <php-general@lists.php.net> > Sent: Thursday, August 17, 2000 12.08 pm > Subject: [PHP] passwd command패스워드 자동화 > > > > > > I want to add users automatically. > > But, I don't know how to do the command about this. > > > > ex) I tried to this.... > > > > <? > > > > function passwd($user, $new_passwd,$re_passwd) { > > > > > > $passwd = $new_passwd."\n".$re_passwd; > > system("echo $passwd | passwd $user"); > > } > > > > ?> > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#12392) next »