Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Login without username & password [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Yukimura
Apprentice
Apprentice


Joined: 25 Aug 2006
Posts: 163
Location: Slovenia

PostPosted: Sat Aug 18, 2007 9:02 am    Post subject: Login without username & password [solved] Reply with quote

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
View user's profile Send private message
giessie
n00b
n00b


Joined: 10 Mar 2005
Posts: 66

PostPosted: Sat Aug 18, 2007 9:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Yukimura
Apprentice
Apprentice


Joined: 25 Aug 2006
Posts: 163
Location: Slovenia

PostPosted: Sat Aug 18, 2007 10:42 am    Post subject: Reply with quote

giessie thanks but won't the player be run by root instead of user?
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Sat Aug 18, 2007 11:48 am    Post subject: Reply with quote

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
View user's profile Send private message
giessie
n00b
n00b


Joined: 10 Mar 2005
Posts: 66

PostPosted: Sat Aug 18, 2007 11:59 am    Post subject: Reply with quote

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
View user's profile Send private message
trilexx
Apprentice
Apprentice


Joined: 19 Jul 2004
Posts: 217
Location: Austria

PostPosted: Sun Aug 19, 2007 10:06 am    Post subject: Reply with quote

Follow swimmer's instructions. They work fine for me :)
_________________
if it lives, compile it :D
Back to top
View user's profile Send private message
Yukimura
Apprentice
Apprentice


Joined: 25 Aug 2006
Posts: 163
Location: Slovenia

PostPosted: Mon Aug 20, 2007 9:44 pm    Post subject: Reply with quote

Thank you all very much for your help. Mingetty is the thing I wanted. ;)

Kind regards and thanks for the tips. :)
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Mon Aug 20, 2007 9:50 pm    Post subject: Reply with quote

Glad I could help :)
Back to top
View user's profile Send private message
b00zy
n00b
n00b


Joined: 31 Oct 2004
Posts: 46

PostPosted: Fri Sep 28, 2007 10:59 am    Post subject: Reply with quote

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
View user's profile Send private message
Yukimura
Apprentice
Apprentice


Joined: 25 Aug 2006
Posts: 163
Location: Slovenia

PostPosted: Fri Sep 28, 2007 2:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum