LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-21-2005, 10:09 AM   #1
ciaran.mooney
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware 9.1
Posts: 18

Rep: Reputation: 0
Automatic User Login / Logon


Afternoon All,

I am trying to get my linux box to boot into a user account automatically. I'm not using KDE or Gnome and every search I do comes up with the same or similar results. Any other results go waaaay over my head.

I cant use KDE or Gnome because I didnt install them and there is very limited space left on the hard drive.

Recap

Automatic Login of User (without using KDE or Gnome)
Automatic starting of X

Any help will be appriciated,

Thanks,

Ciaran
 
Old 03-21-2005, 10:31 AM   #2
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Wdm is a light alternative to gdm and kdm.
http://voins.program.ru/wdm/
Easy to install, but tricky to configure.

But i think it's possible to do what you want with xdm, the default X display manager. Hope someone will post how, cause i'm interested too ^^.

And if someone knows how to install gdm in standalone, 'cause it's the best...
 
Old 03-22-2005, 09:44 AM   #3
ciaran.mooney
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware 9.1
Posts: 18

Original Poster
Rep: Reputation: 0
I havnt tried your suggestion.

But I seemed to have found a solution

a small script added into rc.local

echo "user login"
cd /home/user
su - user

thats probably not exact - but seems to have done the trick.

Thing is it seems too simple. Ive checked that the user that is now automatically logged in cant change any of the /etc/ system files. But the inclusion of "su" in the script seems to worry me.

Are these fears unfounded or am i right?

Ciarán
 
Old 03-22-2005, 09:57 AM   #4
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
This is fun!!
What happens if you type exit?
 
Old 03-22-2005, 10:50 AM   #5
bullium
Member
 
Registered: Aug 2003
Location: Ohio
Distribution: Ubuntu 12.04, Mint 13, RHES 5.5, RHES 6
Posts: 146

Rep: Reputation: 17
Quote:
Originally posted by ciaran.mooney
I havnt tried your suggestion.

But I seemed to have found a solution

a small script added into rc.local

echo "user login"
cd /home/user
su - user

thats probably not exact - but seems to have done the trick.

Thing is it seems too simple. Ive checked that the user that is now automatically logged in cant change any of the /etc/ system files. But the inclusion of "su" in the script seems to worry me.

Are these fears unfounded or am i right?

Ciarán
Your not using the su command alone your using it to switch to the user your specifying. Where as su alone will give you root.

Try this at a terminal while your logged into the box.
Code:
su username

Last edited by bullium; 03-22-2005 at 10:51 AM.
 
Old 03-24-2005, 04:29 AM   #6
ciaran.mooney
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware 9.1
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Linux.tar.gz
This is fun!!
What happens if you type exit?
God knows - the user it logs into can only open Mozilla, Abiword, and Shutdown. Cant access the command prompt/shell.

Thanks for the reassurance.

Ciarán
 
Old 04-06-2005, 02:25 PM   #7
repentorperish
LQ Newbie
 
Registered: Apr 2005
Location: Kigali, Rwanda
Distribution: Slackware 14.1 and 14.0, Ubuntu 14.04, CentOS 5
Posts: 14

Rep: Reputation: 1
i agree that there's something wrong with this... waaay too easy... i've been trying to get autologin working with agetty and mingetty for some time now but i can't avoid getting a password prompt. this is the "correct" way of doing it, though, and there are instructions here:

mingetty (requires you to compile + install the mingetty package): http://easymamecab.mameworld.net/html/autologin.htm
agetty (the default that slackware uses): http://www.linuxgazette.com/issue72/chung.html

but your hack works for me...

if you want to log into a bash shell then use the following in /etc/rc.d/rc.local:

echo "user login"
cd /home/user
su - user -c /bin/bash -l

typing exit returns you to a login prompt (because you haven't changed anything in /etc/inittab).

as soon as bash is run, it executes everything in .bashrc (if you start it like this -- if you log in at a prompt then it seems to prefer .profile), so if you want to start x then there ought to be a way of doing it in here, but it seems that PATH and some other variables aren't set as they'd normally be, so there could be some messing around involved. you'll probably get a warning that job control isn't enabled too; i don't know how to fix this. ideas? it also kills the other terminals until you log out, which may or may not be a good thing.

hth.

dan
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No password user/automatic login to desktop lamiczka Linux - Software 2 11-17-2004 09:50 AM
Logon problem - No login window mko_san Mandriva 9 10-10-2004 01:37 PM
New User cannot logon ikw38 Linux - Networking 1 08-01-2003 07:19 AM
Automatic KDE Logon? dwpondscum Linux - General 2 04-25-2003 07:18 PM
Automatic Login SlavaVB Linux - General 2 03-11-2002 11:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration