View previous topic :: View next topic |
Author |
Message |
Yukimura Apprentice


Joined: 25 Aug 2006 Posts: 163 Location: Slovenia
|
Posted: Sat Aug 18, 2007 9:02 am Post subject: Login without username & password [solved] |
|
|
Hello everyone!
I'm wondering how could I make Gentoo login on tty1 with given username without typing username and password. I know it's not safe but the machine will be in car for playing music so it doesn't matter.
Hope anyone can help me out.
Kind regards! 
Last edited by Yukimura on Mon Aug 20, 2007 9:53 pm; edited 1 time in total |
|
Back to top |
|
 |
giessie n00b

Joined: 10 Mar 2005 Posts: 66
|
Posted: Sat Aug 18, 2007 9:18 am Post subject: |
|
|
I don't know if this would work, but couldn't you just edit your inittab to start your music software (or whatever you use) on tty1?
Now you would have something like this:
Quote: | # TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux |
and you probably want someting like this:
Code: | # TERMINALS
c1:12345:respawn:/bin/mpg123 ... |
|
|
Back to top |
|
 |
Yukimura Apprentice


Joined: 25 Aug 2006 Posts: 163 Location: Slovenia
|
Posted: Sat Aug 18, 2007 10:42 am Post subject: |
|
|
giessie thanks but won't the player be run by root instead of user? |
|
Back to top |
|
 |
swimmer Veteran


Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Sat Aug 18, 2007 11:48 am Post subject: |
|
|
I'm using the autologin feature of mingetty for that ... just emerge mingetty and replace this line in /etc/inittab: Code: | #c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c1:12345:respawn:/sbin/mingetty --autologin <YOUR_USER> tty1 |
If you want you can even startup applications automatically: given that the user has bash as his shell you just put those lines in ~<YOUR_USER>/.bash_profile: Code: | ### startup applications with autologin ###
if [ $(tty) == /dev/tty1 ]; then
<YOUR_APPLICATION> > <YOUR_APPLICATION>.log 2>&1
fi |
HTH
swimmer |
|
Back to top |
|
 |
giessie n00b

Joined: 10 Mar 2005 Posts: 66
|
Posted: Sat Aug 18, 2007 11:59 am Post subject: |
|
|
Yukimura wrote: | giessie thanks but won't the player be run by root instead of user? |
Well, I guess that would be the case. I didn't think much about the implications since you said, it would be for your car. |
|
Back to top |
|
 |
trilexx Apprentice


Joined: 19 Jul 2004 Posts: 217 Location: Austria
|
Posted: Sun Aug 19, 2007 10:06 am Post subject: |
|
|
Follow swimmer's instructions. They work fine for me  _________________ if it lives, compile it  |
|
Back to top |
|
 |
Yukimura Apprentice


Joined: 25 Aug 2006 Posts: 163 Location: Slovenia
|
Posted: Mon Aug 20, 2007 9:44 pm Post subject: |
|
|
Thank you all very much for your help. Mingetty is the thing I wanted.
Kind regards and thanks for the tips.  |
|
Back to top |
|
 |
swimmer Veteran


Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Mon Aug 20, 2007 9:50 pm Post subject: |
|
|
Glad I could help  |
|
Back to top |
|
 |
b00zy n00b

Joined: 31 Oct 2004 Posts: 46
|
Posted: Fri Sep 28, 2007 10:59 am Post subject: |
|
|
This works great. Thanks, swimmer!
The only problem I've encountered is that I no longer have the Shutdown and Restart options when I want to logout of "KDE" after automatically logging in. Is there any way to add these? |
|
Back to top |
|
 |
Yukimura Apprentice


Joined: 25 Aug 2006 Posts: 163 Location: Slovenia
|
Posted: Fri Sep 28, 2007 2:01 pm Post subject: |
|
|
You can change in KDE so it will log one user in by default in Control Center, you really don't need mingetty.  |
|
Back to top |
|
 |
|