| Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-24-2008, 03:20 AM
|
#1
|
|
LQ Newbie
Registered: Oct 2008
Posts: 3
Rep:
|
GDM: Access login credentials after login
Hi,
I have to run a few commands after the user logged in. As I'm using GDM as login manager so there is /etc/gdm/PostLogin/Default script which is able to handle that.
Some of that commands need the users login name and password. Login name is not a problem as $LOGNAME contains that information, but is it possible to access the users password after he has logged in into GDM?
Thanks for your help
El
|
|
|
|
10-24-2008, 04:34 PM
|
#2
|
|
Senior Member
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Rep:
|
Can you explain a bit more why you need this info? Sounds like you want to keylog someones info, which is against the rules: http://www.linuxquestions.org/linux/rules.html
|
|
|
|
10-25-2008, 02:37 AM
|
#3
|
|
LQ Newbie
Registered: Oct 2008
Posts: 3
Original Poster
Rep:
|
Oh, yeah sure!
I manage our universities network and we plan to introduce 802.1x to authenticate the students using our network. 802.1x authentication works well using wpa_supplicant but gui support for wired connections is terrible. The solution has to be as easy as possible.
The idea is that /etc/gdm/PostLogin/Default starts wpa_supplicant and provides the users login credentials via wpa_cli.
Code:
### SETUP NETWORK INTERFACE
#
INTERFACE="eth0"
#
# prompt for users password field
#
if ! PASS=`zenity --entry --hide-text --text "To gain access to the network please enter the password for user \"$LOGNAME\" again:"`; then
exit;
fi
#
# restart network interface
#
ifconfig $INTERFACE down
ifconfig $INTERFACE up
#
# start wpa_supplicant and provide users login credentials
#
wpa_supplicant -D wired -i $INTERFACE -c /etc/wpa_supplicant.conf -f /var/log/wpa_supplicant.log -B
wpa_cli identity network $LOGNAME
wpa_cli password network $PASS
#
sleep 3
#
# start DCHP request
#
dhclient $INTERFACE
#
It works quite well but it's ugly to prompt for the users password. It would be much smoother if I could grab it from GDM so the users won't recognize the authentication process.
|
|
|
|
10-29-2008, 02:37 PM
|
#4
|
|
Senior Member
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Rep:
|
Would you not store this information in the users keyring? That way, the wireless network can pull up info from keyring...
|
|
|
|
10-30-2008, 04:19 AM
|
#5
|
|
LQ Newbie
Registered: Oct 2008
Posts: 3
Original Poster
Rep:
|
Quote:
Originally Posted by irishbitte
Would you not store this information in the users keyring? That way, the wireless network can pull up info from keyring...
|
It's not about authenticating against a wireless network. It's about authenticating against a wired network.
How could I store the credentials in the users keyring? And how could I access them because wpa_supplicant has to run as root.
|
|
|
|
10-30-2008, 04:53 AM
|
#6
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
I'd recommend reading some howto's found with the google terms: 'robust secure network' linux ccmp
I hope you aren't using wpa_psk protocol. The password in that case would be the same for all of the students. The wpa_password isn't the
same as the password that is used for authentication into a host.
If these are fixed lab computers and not the students' own laptops, then I suppose you could have a 'secret' in a file if the
students don't have root access. But if this is the case, why don't the login credentials control who has access to the network?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:48 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|