Skip to content
GitLab
Menu
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
545a0631
Commit
545a0631
authored
Nov 14, 2000
by
Kristin Wright
Browse files
changed ssh chpass call to scp a sh file with the chpass command
parent
48c908f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/mkacct
View file @
545a0631
#!/usr/local/bin/perl -w
###
### $Id: mkacct,v 1.1
7
2000-11-1
3 22:32:45
kwright Exp $
### $Id: mkacct,v 1.1
8
2000-11-1
4 06:35:12
kwright Exp $
###
### Address 'lkw' comments:
### Break up into subroutines, possibly libraries. We'll
...
...
@@ -266,8 +266,18 @@ foreach $IP (@nodes) {
print
"
Adding
$user
to
$IP
\n
";
$addon
=
"
$user
:
$passwd
{
$user
}:
$unix_uid
{
$user
}:
"
.
"
$unix_gid
:
\
:0:0:
$fullname
{
$user
}:/users/
$user
:
"
.
"
/bin/tcsh
\n
";
open
(
CHPASS
,
"
/usr/local/bin/sshtb
$IP
/usr/bin/chpass -a '
$addon
' 2>&1 |
");
"
/bin/tcsh
";
$chpassf
=
"
/tmp/chpasstmp
";
open
(
TMPCHPASS
,
"
>
$chpassf
")
or
die
"
Couldn't open
$chpassf
for writing.
\n
";
print
TMPCHPASS
"
#!/bin/sh
\n
";
print
TMPCHPASS
"
/usr/bin/chpass -a '
$addon
'
\n
";
close
TMPCHPASS
;
open
(
SCP
,
"
/usr/local/bin/scp -pq
$chpassf
$IP
:
$chpassf
2>&1 |
");
while
(
<
SCP
>
)
{
print
$_
;
}
close
SCP
;
open
(
CHPASS
,
"
/usr/local/bin/sshtb
$IP
source
$chpassf
2>&1 |
");
while
(
<
CHPASS
>
)
{
print
"
$_
";
}
close
(
CHPASS
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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