On Fri, Aug 13, 1999 at 04:46:16AM +0000, Paul Black wrote:
> I've almost got Radmin adding new users to my shadow password file. My perl is
> pretty basic. Following is the function being used to add the users.
>
> My first problem is that useradd is not working. How can I display the error
> message from useradd?
The useradd line doesn't seem to have a leading /, you should also check
out the syntax of your useradd program as they vary from OS to OS.
>
> The second problem is that chpasswd takes its input on STDIN. Is the code
> below (currently commented out) correct to do this?
>
You'll have to do something slightly different with chpasswd:
open(CHANGEPASSWORD,"|/usr/sbin/chpasswd");
print CHANGEPASSWORD "$obj->{USERNAME}\:$obj-{PASS_WORD}\n";
close(CHANGEPASSWORD);
[EMAIL PROTECTED]
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.