Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2008-02-15 5:38:46 am

pickwick
Member
Registered: 2007-12-16
Posts: 28

[howto] automatically unlock keyring on login

This is for those of you who don't want to use wicd or wifi-radar...

Before you do this, BEWARE that this poses a security risk as it leaves your keyring password sitting in plaintext on your hard drive. It's probably best to change it to something other than your login password (see below) and be aware of which other passwords you add to your keyring.

Personally, that's a risk I'm willing to take since I don't value my wireless key that much - but it's something everyone has to decide for themselves.

That said, here's the HowTo:

Download the pam-keyring-tool binary (compiled for *buntu 7.10) from here.

Copy it to /usr/bin

Code:

cp ./pam-keyring-tool /usr/bin/

and make it executable

Code:

chmod +x pam-keyring-tool

Now create a file called unlock_keyring.sh, e.g. in $HOME/shellscripts

Code:

mousepad $HOME/shellscripts/unlock_keyring.sh

and put in the following

Code:

#!/bin/sh
echo "YOUR_PASSWORD" | /usr/bin/pam-keyring-tool -u -s

and make it executable

Code:

chmod +x $HOME/shellscripts/unlock_keyring.sh

Now add that shell script to you autostart list by going to Menu --> Settings --> Autostarted Applications


To change your keyring password, go to $HOME/.gnome2/keyrings and delete the file default.keyring and reboot. nm-applet should now ask you for your wireless key and after that, it should ask you to enter a new password for your default keyring.

If that doesn't work - e.g. if you don't have a file called default.keyring and/or you still need to enter your login password to unlock your keyring - then Xubuntu automatically sets your login password to be your keyring password and this is the only way I could figure out how to change it:

First, go to $HOME/.gnome2/keyrings and delete the file login.keyring. Now go to Menu --> System --> Users and Groups and temporarily set your login password to the one you want as your keyring password. Now reboot. Enter your wireless key and unlock your keyring with your new password. Now change your login password back to your old one via Menu --> etc. This will not change your keyring password.


Part of this solution was found here.


Black 4G | 2GB RAM | 8GB SDHC | eeeXubuntu | custom kernel 2.6.24-2-generic

G(r)eekbitches -- random collection of Linux HowTos

Offline

 

#2 2008-02-15 7:17:50 am

wavydavey
Member
Registered: 2007-12-16
Posts: 54

Re: [howto] automatically unlock keyring on login

Brilliant! I'm now happy, that was the last of little niggles with eeexubuntu sorted out.

Offline

 

#3 2008-02-15 2:31:08 pm

eee35
Member
Registered: 2008-01-26
Posts: 23

Re: [howto] automatically unlock keyring on login

it works for me, should be in the wiki

Offline

 

#4 2008-02-15 2:38:47 pm

ashramrak
Member
From: France
Registered: 2008-02-01
Posts: 43

Re: [howto] automatically unlock keyring on login

thank you man, i'll get this done asap

Offline

 

#5 2008-03-07 8:29:16 am

NattyBohman
Member
Registered: 2008-02-07
Posts: 24

Re: [howto] automatically unlock keyring on login

Thanks. Can't wait to try this.

Offline

 

#6 2008-03-07 10:04:23 am

jetfin
Senior Member
From: United States Location:Croatia
Registered: 2008-01-28
Posts: 212

Re: [howto] automatically unlock keyring on login

Thanks much!

Works for me!


701 4g, black; 2gb kingston RAM; TS; usb hub; internal BT
900 (black) with 900a motherboard!

Offline

 

#7 2008-03-08 4:58:50 am

teabagginz
Member
Registered: 2008-01-25
Posts: 53

Re: [howto] automatically unlock keyring on login

it worked! thank you so much!


Galaxy Black 4G, 1GB RAM, 4GB SDHD, EeeXubuntu r3 + Compiz
Original wallpapers on my Flickr

Offline

 

#8 2008-03-12 9:15:16 pm

mediamind
New member
Registered: 2008-02-28
Posts: 5

Re: [howto] automatically unlock keyring on login

Dumb question:
When you say: "Now add that shell script to you autostart list by going to Menu --> Settings --> Autostarted Applications" which shell script specifically are you referring to?

Thanks much for your help!

Offline

 

#9 2008-03-12 11:47:12 pm

jetfin
Senior Member
From: United States Location:Croatia
Registered: 2008-01-28
Posts: 212

Re: [howto] automatically unlock keyring on login

It's the file "unlock_keyring.sh" which you created.

-then the command you put in the new "autostarted applications" entry is the location of that file, such as:
/home/your_user_login_name/shellscripts/unlock_keyring.sh

-or just click on the icon next to the "command" text field and browse to the location you created the file at.


For some reason this didn't work for me after rebooting once (still got the annoying keyring prompt), but then after a second reboot it worked fine...


701 4g, black; 2gb kingston RAM; TS; usb hub; internal BT
900 (black) with 900a motherboard!

Offline

 

#10 2008-03-15 8:33:26 pm

mediamind
New member
Registered: 2008-02-28
Posts: 5

Re: [howto] automatically unlock keyring on login

Thanks for clarifying this jetfin. The autounlock worked on the very next reboot.

Last edited by mediamind (2008-03-15 8:34:54 pm)

Offline

 

#11 2008-03-15 9:31:25 pm

mediamind
New member
Registered: 2008-02-28
Posts: 5

Re: [howto] automatically unlock keyring on login

For any fellow newbies out there, I've translated pickwick's instructions into "easy mode." I'm sure there are more efficient ways to get this done but this is what worked for me so I thought I would share.

1. Download the pam-keyring-tool binary (compiled for *buntu 7.10) to your Desktop from here. http://launchpadlibrarian.net/10241907/pam-keyring-tool

2. Change Directory to Desktop:

Code:

cd /home/YOUR_LOGIN_NAME/Desktop

(*remember to change YOUR_LOGIN_NAME to, well, your actual login name)

3. Copy pam-keyring-tool to /usr/bin

Code:

cp ./pam-keyring-tool /usr/bin/

4. Change directory to /usr/bin:

Code:

cd /usr/bin

5. And make the pam-keyring-tool "executable"

Code:

chmod +x pam-keyring-tool

6. Now create a new folder called "shellscripts" in /home/your_user_name:

Code:

sudo mkdir /home/YOUR_LOGIN_NAME/shellscripts

(again, remember to change YOUR_LOGIN_NAME)

7. Change directory to /home/YOUR_LOGIN_NAME/shellscripts:

Code:

cd /home/YOUR_LOGIN_NAME/shellscripts

(remember to change YOUR_LOGIN_NAME)

8. And create a file called unlock_keyring.sh

Code:

sudo mousepad unlock_keyring.sh

9. Paste in the following code and save and close.

Code:

#!/bin/sh
echo "YOUR_PASSWORD" | /usr/bin/pam-keyring-tool -u -s

(be sure to change YOUR_PASSWORD to your current password)

10. Now make the file executable

Code:

chmod +x unlock_keyring.sh

11. Lastly, add the shell script to you autostart list. You can do this by going to Menu --> Settings --> Autostarted Applications (click "+Add") and then click on the folder icon beside "Command" and navigate to your "unlock_keyring.sh" file (/home/YOUR_LOGIN_NAME/shellscripts)

12. Click OK and Reboot

Last edited by mediamind (2008-03-15 9:35:34 pm)

Offline

 

#12 2008-03-23 8:17:18 pm

th0r
New member
Registered: 2008-01-27
Posts: 9

Re: [howto] automatically unlock keyring on login

I have a problem sad When I execute command: cp ./pam-keyring-tool /usr/bin/

I get: cp: cannot create regular file `/usr/bin/pam-keyring-tool': Permission denied

What to do?

I am under root ...

Offline

 

#13 2008-04-05 7:32:13 am

bukharin
Member
Registered: 2008-04-02
Posts: 11

Re: [howto] automatically unlock keyring on login

@th0r: are you sure you're root? If you're root, you shouldn't get that message. To check who you are, type:
whoami

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson