true has asked for the wisdom of the Perl Monks concerning the following question:
Here's what root.pl does to add the user.
I know it is running as root with cron b/c i've tested with:#!/usr/bin/perl use strict; use Crypt::Passwd; my $home = "/var/www/grpname/"; my $user = "User23"; my $password = "xR3rts"; my $grp = "grpname"; my $cpass = unix_std_crypt($password, "salt"); my $re = system("useradd -g $grp -p $cpass -d $home $user"); print "ADDUSER:$re\n"; exit;
Both return root to my log whether running from cron or manually with ssh. I've looked for the error 65280 with no luck.my $real = getpwuid($<); my $effective = getpwuid($>);
Any ideas as to why im getting 65280 error when cron tries? Thanks for reading.
jtrue
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: useradd with perl and cron
by Zaxo (Archbishop) on Jun 11, 2003 at 06:15 UTC | |
Re: useradd with perl and cron
by true (Pilgrim) on Jun 11, 2003 at 06:25 UTC | |
by tachyon (Chancellor) on Jun 11, 2003 at 11:58 UTC | |
Re: useradd with perl and cron
by thor (Priest) on Jun 11, 2003 at 12:30 UTC | |
by tachyon (Chancellor) on Jun 11, 2003 at 12:44 UTC | |
by thor (Priest) on Jun 11, 2003 at 18:40 UTC | |
Re: useradd with perl and cron
by nimdokk (Vicar) on Jun 11, 2003 at 12:53 UTC |