On Monday, Dec 4, 1995, at 15:32 US/Pacific, rhlinux wrote: [..]

quote:
----------------------------------------------------------------------- -------
system(passwd username )
----------------------------------------------------------------------- -------


but this takes the password from the user, i have also tried a lot
of attributes to passwd command but nothing worked
[..]

the obvious first part of the problem is
are you running the command as 'root'?
Since only root can do the change of
the passwd file(s).

I have not run into Andrew Gaffney's problem,
since if this is an application to be run at
the command line, then one is STILL attached
to the tty/pty. If this is not going to be
an interactive command, then we have way
deeper issues to deal with.

Depending on which system you are on,
you may want to look at useradd
cf man useradd
for creating a user.

But back to your core problem, namely that
the passwd command on many systems IS interactive
and as such you can not do 'interactions' with it
with the system command. What you will need to do
is the bi-directional pipe solution:
cf:
<http://www.wetware.com/drieux/PR/blog2/Code/200311.html#id3152776334>

ciao
drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to