[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: auto login

> I'm writing a shell script to automatically login to one of my server
Ummm... this seems like a strange thing to want to do - I probabily just
don't understand the problem but why would you want to bypass security
when you could run the script from cron / start as root and su / sudo /
init / use ssh?

> but I have a problem with the login prompt asking me to supply the user
> name and password, is there any way I can automate this in my script, i
> mean supply the username and password if ever there is prompt in the
> application without interactive prompt, in general, i know in ssh it's
> quite easy to do it.
You haven't said what /kind/ of login prompt - graphical or text.  Plus
having your password in clear text somewhere is increasing the security
risk.  Well if you really want to I'd strongly suggest you look at PAM
first http://www.kernel.org/pub/linux/libs/pam/ as well as sudo(8).  If
neither of them will cut it then perhaps what you need is chat(8).

TBH it strikes me their must be an easier way than trying to get a
non-interactive porgram to work with an interactive interface.

Sweet Dreams,
 - Martin
"Seasons change, things come to pass"

Reply to: