LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 07-03-2004, 11:03 PM   #1
the_woelf
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Rep: Reputation: 0
autologin to console?


hey, I want the computer to turn on and autologin to console with a nonroot user . I've almost gotten it to work, here is what i have done:

------------------------------------------------------------------------------------------------

following www [dot] linuxgazette.com/issue72/chung.html (would have liked to make a hyperlink, but i need more posts ) very closely, I wrote the program autologin:

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

compiled it with gcc, and placed it in /usr/local/sbin. then ive modiffied the first line of inittab to look like this:

c1:2345:respawn:/sbin/agetty -n -l /usr/local/sbin/autologin 38400 tty1

------------------------------------------------------------------------------------------------


problem is that it still prompts student for a password (it logs them in, but the password must still be manually entered)

ive thought up a couple of solutions, but i dont know how to go about doing them, these are:

a) make the user student passwordless (not sure if this is possible)

b) modify my autologin program to somehow enter the password?

NOTE im pretty sure that what is in inittab is solid, but the problem could very well lie there.

thanks for any ideas/help

Last edited by the_woelf; 07-03-2004 at 11:04 PM.
 
Old 07-04-2004, 12:00 AM   #2
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
As i understand u want the user to login with out entering passwd(passwdless). as below question:

a) make the user student passwordless (not sure if this is possible)

Here is the steps :

if you are in GUI (login as root user) to open a console and type :

press alt+f2 [run command]

type : konsole [to open konsole]

Now type:

[root@mail root]# passwd -d <username> [enter]

It will show you some thing like this:

[root@mail root]# passwd -d hitesh
Removing password for user hitesh.
passwd: Success
[root@mail root]#

Now press Ctrl + Alt + F3 [to go terminal]

Login with that user <username> [i.e. hitesh] and check it.

Hope this helps.

-Hitesh
 
Old 07-04-2004, 04:01 AM   #3
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Or if you want to do it with C, you have to learn a little about GNU/Linux PAM authentication API :

http://docs.linux.cz/pam/pam_appl.html
http://docs.linux.cz/pam/pam_appl-8.html << an application example in C
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
autologin after reboot nazir Linux - Newbie 3 08-08-2005 05:01 AM
autologin zaicheke Linux - General 1 07-16-2004 07:15 PM
Autologin into KDE...help vacman Linux - Newbie 1 06-13-2004 06:05 PM
autologin on RH 7.2 mehesque Linux - General 0 06-08-2004 08:16 AM
Autologin Getty rch Linux - Security 5 04-15-2003 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09: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