Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- date.sh requires root privileges. I have put this in a file shell1.sh. and I want to run "sh shell1.sh" without entering password on the prompt.
- #!/usr/bin/
- spawn sudo sh date.sh
- expect "password:"
- send "my_password"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement