Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
1c9964de
Commit
1c9964de
authored
Jan 04, 2001
by
Mac Newbold
Browse files
Add full name to acct creation on paper and plastic, resolve paperbag conflict.
parent
94b8749d
Changes
2
Hide whitespace changes
Inline
Side-by-side
tbsetup/mkacct-ctrl.in
View file @
1c9964de
#!/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
"
.
...
...
tbsetup/sched_reload.in
View file @
1c9964de
...
...
@@ -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
";
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment