LinuxQuestions.org
Visit Jeremy's Blog.
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 11-23-2006, 09:59 PM   #1
noisome
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Rep: Reputation: 0
Lightbulb Text Display Manager, is it possible/safe/done?


Is there a Text Display Manager similar to GDM with user list and selection, rather than type user name and type password? I would like the ability to have an auto-login, a list of users, and possibly enter in password, etc. The reason is because I like quick without overhead in case of GDM/KDM. I know there is WDM but I would like to pursue this.

I made a crappy version that suffices for the idea. I'm positive that it is not secure but I can log in with no passwords to any user.

I hope someone has a better way of doing this or even has ways of helping me achieve my goal.

In the file /etc/rc.d/rc.local I added:

Code:
while [ 1 ]
do 
dialog --title "Login Selection" --menu "Login" 15 40 10 `echo -n \`awk -F: '{ if ($3 >= 1000) { print $1,FNR "\n"}}' /etc/passwd\` ` "root" "1" 2>/tmp/ans
if [ $? == 1 ]
	then
   rm -f /tmp/ans
   clear
   exit 0
fi
LOGINDIAG=`cat /tmp/ans`
rm /tmp/ans
su - $LOGINDIAG
done
This code basically at boot lists the users created (Mom, Dad, Brother, Sister) and the person selects a user and they are logged in and running. When logged out it returns to this selection screen. To get root access, hit cancel instead of ok.

Any ideas, help or whatnot?

I am far from a guru, but am not timid in doing things. Simplicity is the goal, but I'm willing to test.

Thanks for any help and interest.
Noisome

Last edited by noisome; 11-23-2006 at 10:29 PM.
 
Old 11-24-2006, 12:16 AM   #2
2.718281828
Member
 
Registered: Jan 2004
Distribution: Arch, formerly Slackware
Posts: 43

Rep: Reputation: 15
Maybe you could change the line
Code:
su - $LOGINDIAG
to something like
Code:
su nobody -c "su - $LOGINDIAG"
. That way, the user would have to type the password of the account they are trying to use. I remember that Knoppix used an autologin for each terminal, doing something like
Code:
su - username < /dev/tty0 > /dev/tty0
in /etc/inittab instead of the usual agetty program. I don't remember exactly what the command was though.
 
Old 11-24-2006, 01:04 PM   #3
noisome
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by 2.718281828
Maybe you could change the line
Code:
su - $LOGINDIAG
to something like
Code:
su nobody -c "su - $LOGINDIAG"
. That way, the user would have to type the password of the account they are trying to use.
Thank you very much for your reply!

I have tried "su nobody -c ..." and basically I can't su into nobody unless I'm already logged in so running a command from it is not viable. But I looked into it and the "login" command works the same way you stated without problems. The line
Code:
su - $LOGINDIAG
was changed to
Code:
login -f $LOGINDIAG
and now it asks for the password.

Is there a way to authenticate with dialog --passwordbox? I haven't been able to figure out how to authenticate without saving the password to a file...

Thanks a ton for your help. And I am still looking for what you mentioned, the login screen on each terminal, which would be really neat.

The complete code:

Code:
while [ 1 ]
do 
dialog --title "Login Selection" --menu "Login" 15 40 10 `echo -n \`awk -F: '{ if ($3 >= 1000) { print $1,FNR "\n"}}' /etc/passwd\` ` "root" "1" 2>/tmp/ans
if [ $? == 1 ]
    then
   rm -f /tmp/ans
   clear
   exit 0
fi
LOGINDIAG=`cat /tmp/ans`
rm /tmp/ans
login -f $LOGINDIAG
done
Noisome

Last edited by noisome; 11-24-2006 at 01:45 PM.
 
  


Reply


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
SED - display text on specific line of text file 3saul Linux - Software 3 12-29-2005 05:32 PM
Mandrake package manager - text mode? digitalgravy Linux - Newbie 1 05-17-2004 04:16 PM
Display Manager aikempshall Mandriva 2 02-12-2004 04:11 PM
Text based multithreads Download manager freelinuxcpp Linux - Software 3 10-18-2003 10:42 AM
Display Manager DavidTempler Linux - Newbie 0 08-01-2003 04:50 AM

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

All times are GMT -5. The time now is 02:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration