Update su.sh
Browse files
su.sh
CHANGED
@@ -1,12 +1,8 @@
|
|
1 |
#!/usr/bin/expect
|
2 |
|
3 |
-
set user [lindex $argv
|
4 |
-
set password [lindex $argv
|
5 |
-
set command [lindex $argv
|
6 |
-
|
7 |
-
echo $user
|
8 |
-
echo $password
|
9 |
-
echo $password
|
10 |
|
11 |
log_user 1;
|
12 |
spawn su - $user -c "$command"
|
|
|
1 |
#!/usr/bin/expect
|
2 |
|
3 |
+
set user [lindex $argv 1]
|
4 |
+
set password [lindex $argv 2]
|
5 |
+
set command [lindex $argv 3]
|
|
|
|
|
|
|
|
|
6 |
|
7 |
log_user 1;
|
8 |
spawn su - $user -c "$command"
|