# Login without username & password [solved]

## Yukimura

Hello everyone!  :Smile: 

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!  :Smile: Last edited by Yukimura on Mon Aug 20, 2007 9:53 pm; edited 1 time in total

----------

## giessie

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:

```
# TERMINALS

c1:12345:respawn:/bin/mpg123 ... 
```

----------

## Yukimura

giessie thanks but won't the player be run by root instead of user?

----------

## swimmer

I'm using the autologin feature of mingetty for that ... just emerge mingetty and replace this line in /etc/inittab:

```
#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:

```
### startup applications with autologin ###

if [ $(tty) == /dev/tty1 ]; then

  <YOUR_APPLICATION> > <YOUR_APPLICATION>.log 2>&1

fi
```

HTH

swimmer

----------

## giessie

 *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.

----------

## trilexx

Follow swimmer's instructions. They work fine for me  :Smile: 

----------

## Yukimura

Thank you all very much for your help. Mingetty is the thing I wanted.  :Wink: 

Kind regards and thanks for the tips.  :Smile: 

----------

## swimmer

Glad I could help  :Smile: 

----------

## b00zy

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?

----------

## Yukimura

You can change in KDE so it will log one user in by default in Control Center, you really don't need mingetty.  :Wink: 

----------

