« Return to Thread: How do I setup OpenBSD to login automatically and lauch minicom?

Re: How do I setup OpenBSD to login automatically and lauch minicom?

by David Schulz-5 :: Rate this Message:

Reply to Author | View in Thread

Hi,

i would want to do something similar, but have not found the best way to
have a user autologin to a certain console.

What i did was i added a user "autologin" with some password. Then i
added "su autologin" to /etc/rc.local. That takes care of logging the
user in. Then i added my actions ( i wanted to start vmstat) to the
.login file. Im sure i will get scolded, but this way does login a user
and executes the program i wanted automatically at boot. I guess the
proper way to login a user would be to change stuff in /etc/ttys and
gettytab , but i didnt know how to do it and didnt have time to investigate.

Bye,
David

Theodore Wynnychenko wrote:

> Hello
>
> I am trying to figure out how to modify the boot process to automatically
> spawn a minicom session. (I know I have many other options for what I am
> trying to do, but I thaught this would be a good way to learn someghing
> about OpenBSD.)
> Basically, I have an old laptop, and (partially as a way to learn something
> about OpenBSD) I want to set it up as a serial console to use with other
> systems.  Thus, I am not at all concerned about the security of the login
> process (this laptop, once configured) will not connect to a network, and
> will have (pretty much) all services disabled.  I was also going to convert
> the filesystems to read-only, so, a hard shutdown won't disrupt the
> filesystems.
> In any case, here is my question(s).  I have been reading the man pages, and
> (in summary) I see that that boot loads the kernel (bsd), pass control to
> init which parses through rc, and then spawns the process getty (as defined
> by ttys).  This results in the login prompt, which, when a username is
> entered, calls login which authenticates (using login_passwd), and then sets
> several enviormental variables, before spawning a shell.  I think this is
> right?
> So, I think the place for me to modify this process is by changing the
> variable to execute getty in /etc/ttys to instead launch minicom?   I tried
> this, but (i guess, obviously) it did not work.
> I assume that I have to set enviormental variables before minicom is
> started?  Do I need getty and login to spawn a shell before starting
> minicom?  If I need to go through getty and login, is there a way to
> automatically login without password (or any other authentication)?  Would a
> simple script that sets the enviornemt variables and runs minicom work?
> I noticed a statement in one of the entries on this mailing list that
> indicated there was a way to do something like this (login automatically /
> start a program automatically on login), and that this information was in
> the FAQ's, however, I can't seem to find it.
> Any help would be really appreciated.
> thanks
>
>
> !DSPAM:485f113a205001296011478!

 « Return to Thread: How do I setup OpenBSD to login automatically and lauch minicom?