LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-19-2013, 07:01 AM   #1
vitalstrike82
Member
 
Registered: Oct 2007
Location: Singapore
Distribution: OpenSuse, Slackware, Redhat
Posts: 315

Rep: Reputation: 40
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
 
Old 02-19-2013, 07:10 AM   #2
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Rep: Reputation: Disabled
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
 
1 members found this post helpful.
Old 02-19-2013, 07:17 AM   #3
lkraemer
Member
 
Registered: Aug 2008
Posts: 111

Rep: Reputation: 10
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

Last edited by lkraemer; 02-19-2013 at 05:24 PM.
 
1 members found this post helpful.
Old 02-19-2013, 10:17 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,269
Blog Entries: 3

Rep: Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445
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.
 
Old 02-19-2013, 10:23 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,269
Blog Entries: 3

Rep: Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445
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
 
1 members found this post helpful.
Old 02-19-2013, 01:43 PM   #6
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
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.
 
1 members found this post helpful.
Old 02-19-2013, 10:07 PM   #7
humid
LQ Newbie
 
Registered: Jan 2013
Posts: 12

Rep: Reputation: Disabled
To login without giving a password what are the security issues? not locally, remotely? ...Or are there any?
 
Old 02-20-2013, 03:10 AM   #8
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.0
Posts: 578
Blog Entries: 2

Rep: Reputation: 75
Quote:
Originally Posted by lkraemer View Post
...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.
 
Old 02-20-2013, 03:55 AM   #9
vitalstrike82
Member
 
Registered: Oct 2007
Location: Singapore
Distribution: OpenSuse, Slackware, Redhat
Posts: 315

Original Poster
Rep: Reputation: 40
thanks to all for the response. set up everything for my 70 yr old father.
now he can start the laptop with ease.

thanks
 
Old 02-20-2013, 04:47 AM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,762

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
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.
 
Old 02-20-2013, 01:16 PM   #11
humid
LQ Newbie
 
Registered: Jan 2013
Posts: 12

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


Reply

Tags
cec


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want FC10 thumbdrive boot to ask for login user, not go in as liveruser automatically ericcarlson Red Hat 1 12-29-2008 07:24 PM
how to startx automatically on login kushalkoolwal Debian 11 10-29-2005 11:16 AM
Cannot login automatically arvindn LQ Suggestions & Feedback 1 11-26-2003 10:48 PM
Q) How to automatically login? jattreadwell Linux - General 7 06-20-2003 01:01 PM
? automatically login to X ? VioLaToR Slackware 6 05-06-2003 04:32 AM


All times are GMT -5. The time now is 07:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration