Re: Logon script
- From: Bill Marcum <bmarcum@xxxxxxxxx>
- Date: Thu, 26 Oct 2006 11:32:31 -0400
On 25 Oct 2006 10:35:58 -0700, nicetom786@xxxxxxxxx
<nicetom786@xxxxxxxxx> wrote:
I did use expect and it prompts me for the password.expect "string" and send "string" are expect commands, not shell
This should work right?
su - user1
expect "Password: "
send "xyz"
commands, and you would have them executed after su returns. You can
write a script like this:
#!/usr/bin/expect -f
spawn su - user1
expect "Password:"
send "xyz"
interact
--
BOFH excuse #348:
We're on Token Ring, and it looks like the token got loose.
.
- Follow-Ups:
- Re: Logon script
- From: nicetom786
- Re: Logon script
- References:
- Logon script
- From: nicetom786
- Re: Logon script
- From: Bill Marcum
- Re: Logon script
- From: nicetom786
- Re: Logon script
- From: Bill Marcum
- Re: Logon script
- From: nicetom786
- Logon script
- Prev by Date: Re: permissions problem
- Next by Date: Re: Logon script
- Previous by thread: Re: Logon script
- Next by thread: Re: Logon script
- Index(es):
Relevant Pages
|
|