Commit 1c9964de authored by Mac Newbold's avatar Mac Newbold

Add full name to acct creation on paper and plastic, resolve paperbag conflict.

parent 94b8749d
#!/usr/local/bin/perl -wT
### $Id: mkacct-ctrl.in,v 1.2 2001-01-04 23:18:12 stoller Exp $
### $Id: mkacct-ctrl.in,v 1.3 2001-01-04 23:22:54 newbold Exp $
use English;
use Mysql;
......@@ -157,6 +157,7 @@ sub dowork() {
#
print "Adding user $user to paper.\n";
my $cmd = "/usr/sbin/pw useradd $user -u $user_number " .
"-n '$fullname' ".
"-k /usr/share/skel -m " .
"-d /users/$user -g $project " .
"-s $PBAG";
......@@ -181,11 +182,13 @@ sub dowork() {
print "Adding user $user to $control_node.\n";
$cmd = "/usr/local/bin/sshtb $control_node " .
"/usr/sbin/pw useradd $user -u $user_number " .
"-n '$fullname' ".
"-d /users/$user -g $project -s /bin/tcsh";
open(PWADD, "$cmd 2>&1 |") or die "$0: Could not open pw useradd.";
while (<PWADD>) { print "$_"; }
$cmd = "/usr/local/bin/sshtb $control_node " .
"/usr/sbin/pw usermod $user -h 0";
# Old attempt at password setting
#$cmd = "/usr/local/bin/sshtb $control_node " .
# "/usr/sbin/pw usermod $user -h 0";
close(PWADD);
open(CHPASS, "/usr/local/bin/sshtb $control_node " .
......
......@@ -159,7 +159,7 @@ foreach my $node (@nodes) {
$sth = $DB->query("select * from nodes where node_id='$pc'");
if ($sth == 0) {
die("Database lookup failed (reserved). Aborted...\n");
die("Database lookup failed (exists). Aborted...\n");
}
if ($sth->num_rows() != 1) {
print STDERR "Node $pc doesn't exist. Skipping $pc.\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment