LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   how to boot slacker 14 where login is done automatically (http://www.linuxquestions.org/questions/slackware-14/how-to-boot-slacker-14-where-login-is-done-automatically-4175450780/)

vitalstrike82 02-19-2013 08:01 AM

how to boot slacker 14 where login is done automatically
 
hi all, I'm setting slackware 14 for my father.

but I think the logging in process maybe too complicated for him.

can I know or which website I can refer to for steps to enable automatically log in as the user and as Well as not required to enter startx command to display the user interface

thanks:)

tuxbg 02-19-2013 08:10 AM

Create a file with that name autologin put this in that file

Code:

#include <unistd.h>

int main() {
  execlp( "login", "login", "-f", "YOUR_USER_NAME", 0);
}

Next compile that little program

Code:

gcc -o autologin autologin.c
Put autologin in /usr/local/sbin

Next

Code:

chown root:root /usr/local/sbin/autologin
Edit your /etc/inittab

Code:

# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
#c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c3:235:respawn:/sbin/agetty -n -l /usr/local/sbin/autologin 38400 tty3 linux

In your $HOME/.bashrc or $HOME/bash_profile put this

Code:

if [ -z "$DISPLAY" ] && [ $(tty) == "/dev/tty3" ]; then
  startx
fi


lkraemer 02-19-2013 08:17 AM

vitalstrike82,
That is easy enough, but first I'd suggest you check to make sure you have all the groups added to the user so your
father can have access to the things he may need.

My groups are:
users lp wheel floppy dialout audio video cdrom plugdev power netdev scanner vboxusers

Having that set properly you may want to shorten the initial boot screen to speed up his boot time.
What you are looking to change is the timeout line in /etc/lilo.conf. Here it is set for 15 seconds.
you will need to edit this file as root and then run lilo for the change to take effect.
(I use 8 to 10 seconds for my setting.)

Code:

# Append any additional kernel parameters:
append=" vt.default_utf8=0"
prompt
timeout = 150
# Normal VGA console


Graphical Login:
REF: http://docs.slackware.com/slackware:beginners_guide

To boot into the graphical environment, change this line in /etc/inittab. (Replace 3 with 4).

Code:

# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:

That should do it.

Larry

onebuck 02-19-2013 11:17 AM

Member Response
 
Hi,

From 'man lilo.conf';
Quote:

timeout=<tsecs>
sets a timeout (in tenths of a second) for keyboard input at the boot: prompt. "timeout" only has meaning if "prompt" is mentioned. If no key
is pressed for the specified time, the default image is automatically booted. The default timeout is infinite.
Adjust accordingly! '15' would be 1.5 seconds. :)

onebuck 02-19-2013 11:23 AM

Member Response
 
Hi,

One other thing would be to add 'compact' to the global section to speed things up. Plus do not forget to run 'lilo' as root again;
Code:

~# lilo -v -t -b /dev/Your_MBR_Device      #this will test
~# lilo -v -b /dev/Your_MBR_Device        #Your boot drives MBR


Woodsman 02-19-2013 02:43 PM

If you want auto login, configure the system boot into run level 4 (init 4) and use a login manager that supports auto login. That way you avoid a console login and typing anything.

If you want to keep using lilo as the boot manager, the default 2 minute wait is excessive. Change that time too. :)

humid 02-19-2013 11:07 PM

To login without giving a password what are the security issues? not locally, remotely? ...Or are there any?

psionl0 02-20-2013 04:10 AM

Quote:

Originally Posted by lkraemer (Post 4895072)
...you may want to shorten the initial boot screen to speed up his boot time.
What you are looking to change is the timeout line in /etc/lilo.conf. Here it is set for 15 seconds.
you will need to edit this file as root and then run lilo for the change to take effect.
(I use 8 to 10 seconds for my setting.)

Code:

# Append any additional kernel parameters:
append=" vt.default_utf8=0"
prompt
timeout = 150
# Normal VGA console


If you simply comment out the prompt line then there is no waiting at all (suitable if Slackware is your only system and you are going for autologin).

My preference is to use runlevel 4 and have slim as the login manager.

vitalstrike82 02-20-2013 04:55 AM

thanks to all for the response. set up everything for my 70 yr old father.
now he can start the laptop with ease.

thanks:)

gnashley 02-20-2013 05:47 AM

In response to humid, there are no remote security concerns affected by using autologin. The security aspects of the users' privileges are the same, no matter how he logs in.

humid 02-20-2013 02:16 PM

Thanks gnashley, don't think I will go that route but was curious.


All times are GMT -5. The time now is 07:46 AM.