Spaces:
Paused
Paused
BinaryONe
commited on
Commit
·
588df1e
1
Parent(s):
395dde2
Changes
Browse files
start.sh
CHANGED
|
@@ -98,7 +98,18 @@ change_account() {
|
|
| 98 |
|
| 99 |
if id -u "$username" >/dev/null 2>&1; then
|
| 100 |
echo "* Trying Switching to user: $username *"
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
echo "$password" | su -p "$username"
|
| 103 |
echo "* Now running as 2: $(whoami) *"
|
| 104 |
|
|
|
|
| 98 |
|
| 99 |
if id -u "$username" >/dev/null 2>&1; then
|
| 100 |
echo "* Trying Switching to user: $username *"
|
| 101 |
+
expect -c "
|
| 102 |
+
spawn su -p $username -c 'echo \"* Now running as: \$(whoami) *\"'
|
| 103 |
+
expect \"Password:\"
|
| 104 |
+
send \"$password\r\"
|
| 105 |
+
interact
|
| 106 |
+
"
|
| 107 |
+
expect -c "
|
| 108 |
+
spawn su -p $username
|
| 109 |
+
expect \"Password:\"
|
| 110 |
+
send \"$password\r\"
|
| 111 |
+
interact
|
| 112 |
+
"
|
| 113 |
echo "$password" | su -p "$username"
|
| 114 |
echo "* Now running as 2: $(whoami) *"
|
| 115 |
|