Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gnome keyring manager
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
kaksi
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2004
Posts: 125

PostPosted: Wed Mar 29, 2006 11:57 am    Post subject: Gnome keyring manager Reply with quote

Hi!

If I have the same password for my user as the keyring manager shouldn't the keyring automaticly be unlocked when I login? Is there a way to enable this?

I want my keyring to be unlocked automaticly when I login.
Back to top
View user's profile Send private message
Izydorr
n00b
n00b


Joined: 10 Sep 2004
Posts: 45
Location: Poland / Warsaw

PostPosted: Thu Jul 27, 2006 9:25 am    Post subject: Reply with quote

me too!
Back to top
View user's profile Send private message
jedioetzi
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2003
Posts: 91
Location: Bolzano

PostPosted: Wed Aug 16, 2006 8:00 am    Post subject: Reply with quote

if you logint through gdm then add the following lines to /etc/pam.d/gdm

Code:
# login in keyring
auth optional pam_keyring.so try_first_pass
session optional pam_keyring.so
Back to top
View user's profile Send private message
aysther
n00b
n00b


Joined: 05 Sep 2005
Posts: 68
Location: Charlotte, NC

PostPosted: Sat Dec 23, 2006 4:37 am    Post subject: Reply with quote

In order for this approach to work, you need to have the sys-auth/pam_keyring package installed, which I have had some trouble getting to work. If anyone has gotten this to work, please let me know!
_________________
Microsoft Ceo "I'm Going to F'ing Kill Google."
Back to top
View user's profile Send private message
maKKus
Guru
Guru


Joined: 07 Aug 2002
Posts: 356
Location: /Universe/Milky Way/Sol/Earth/Europe/EEC/The Netherlands/Limburg/Beek/Neerbeek

PostPosted: Fri Dec 29, 2006 7:58 am    Post subject: Reply with quote

I had the same trouble, it just wouldn't work, but yesterday I looked at the example file in /usr/portage/sys-auth/pam_keyring/files/gdm.example and I recreated my /etc/pam.d/gdm by copying the pam_keyring parts from the example at the same location in my pam.d/gdm file and now it works....

my /etc/pam.d/gdm

#%PAM-1.0
auth optional pam_env.so
auth optional pam_keyring.so try_first_pass
auth include system-auth
auth required pam_nologin.so
account include system-auth
password include system-auth
session include system-auth
session optional pam_keyring.so
Back to top
View user's profile Send private message
aysther
n00b
n00b


Joined: 05 Sep 2005
Posts: 68
Location: Charlotte, NC

PostPosted: Sat Dec 30, 2006 3:33 pm    Post subject: Reply with quote

Hmmm... When I do what you did, I have to type my password twice on the GDM login screen, and then I still am asked for the keyring password once I log in.

Thoughts?
_________________
Microsoft Ceo "I'm Going to F'ing Kill Google."
Back to top
View user's profile Send private message
maKKus
Guru
Guru


Joined: 07 Aug 2002
Posts: 356
Location: /Universe/Milky Way/Sol/Earth/Europe/EEC/The Netherlands/Limburg/Beek/Neerbeek

PostPosted: Sat Dec 30, 2006 3:44 pm    Post subject: Reply with quote

Sorry, I can't help you, only thing I can say is that it didn't work for me either, untill I changed the /etc/pam.d/gdm again after several other attemps and now with gdm.example as example. I didn't emerge it again or anything else, just changed the /etc/pam.d/gdm. I guess there is some sort of timing problem, starting gnome-keyring and unlocking the keyring, but that is a guess.

Here is what my /var/log/everything/current says after a login:
Dec 30 10:37:40 [gdm] pam_keyring(gdm:auth): pam_keyring: starting gnome-keyring
-daemon
Dec 30 10:37:40 [gdm] pam_keyring(gdm:auth): pam_keyring: unlocking keyring
Dec 30 10:37:40 [gdm] pam_keyring(gdm:auth): pam_keyring: going to execute /usr/
libexec/pam-keyring-tool -u -s
Back to top
View user's profile Send private message
BigBaaadBob
Guru
Guru


Joined: 19 Apr 2003
Posts: 342
Location: Swampscott, MA USA

PostPosted: Mon Jan 01, 2007 2:06 am    Post subject: Reply with quote

aysther wrote:
Hmmm... When I do what you did, I have to type my password twice on the GDM login screen, and then I still am asked for the keyring password once I log in.

I'm exactly where you are. I don't think this works at all. To be sure everyhing is reset I:
  • /etc/init.d/xdm stop
  • pkill gnome-keyring-daemon
  • /etc/init.d/xdm start

When I do that what I get in the log is:
Code:
Dec 31 20:50:30 wideload gdm[14906]: pam_keyring: gdm: pam_keyring: starting gnome-keyring-daemon
Dec 31 20:50:30 wideload gdm[14906]: pam_keyring: gdm: pam_keyring: gnome-keyring-daemon failed to start correctly, exit code: 180
where the exit code seems to be a random number.
Back to top
View user's profile Send private message
Sachankara
l33t
l33t


Joined: 11 Jun 2004
Posts: 696
Location: Stockholm, Sweden

PostPosted: Mon Jan 22, 2007 8:18 am    Post subject: Reply with quote

BigBaaadBob wrote:
aysther wrote:
Hmmm... When I do what you did, I have to type my password twice on the GDM login screen, and then I still am asked for the keyring password once I log in.

I'm exactly where you are. I don't think this works at all. To be sure everyhing is reset I:
  • /etc/init.d/xdm stop
  • pkill gnome-keyring-daemon
  • /etc/init.d/xdm start

When I do that what I get in the log is:
Code:
Dec 31 20:50:30 wideload gdm[14906]: pam_keyring: gdm: pam_keyring: starting gnome-keyring-daemon
Dec 31 20:50:30 wideload gdm[14906]: pam_keyring: gdm: pam_keyring: gnome-keyring-daemon failed to start correctly, exit code: 180
where the exit code seems to be a random number.
It doesn't work for me either. It always spits out the following:
Code:
Jan 22 09:11:08 arika gdm[9864]: pam_keyring: gdm: pam_keyring: starting gnome-keyring-daemon
Jan 22 09:11:08 arika gdm[9864]: pam_keyring: gdm: pam_keyring: gnome-keyring-daemon failed to start correctly, exit code: 141


Should I file a bug report?

P.S. gnome-keyring-daemon is started, but none of its environment variables are exported, so it won't work.
_________________
Gentoo Hardened Linux 2.6.21 + svorak (Swedish dvorak)
Back to top
View user's profile Send private message
Skandal
n00b
n00b


Joined: 28 Aug 2004
Posts: 12

PostPosted: Fri Feb 16, 2007 1:49 pm    Post subject: Reply with quote

I've discovered that it doesn't work for me when I use autologin with gdm, when I actually type my password at the login screen it works.
Back to top
View user's profile Send private message
Sachankara
l33t
l33t


Joined: 11 Jun 2004
Posts: 696
Location: Stockholm, Sweden

PostPosted: Fri Feb 16, 2007 2:21 pm    Post subject: Reply with quote

Skandal wrote:
I've discovered that it doesn't work for me when I use autologin with gdm, when I actually type my password at the login screen it works.
That is understandable as autologin doesn't send any password to gnome-keyring-manager. Autologin doesn't work with any pam module that requires a password.
_________________
Gentoo Hardened Linux 2.6.21 + svorak (Swedish dvorak)
Back to top
View user's profile Send private message
ubikas
n00b
n00b


Joined: 08 Oct 2003
Posts: 12

PostPosted: Sat Mar 17, 2007 1:59 pm    Post subject: Reply with quote

There is a patch for pam_keyring, which shoud fix problem mentioned above.
To try it, look at this bug:
https://bugs.gentoo.org/show_bug.cgi?id=164375
Back to top
View user's profile Send private message
Onip
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2912
Location: Parma (Italy)

PostPosted: Fri Mar 30, 2007 3:51 pm    Post subject: Reply with quote

aysther wrote:
Hmmm... When I do what you did, I have to type my password twice on the GDM login screen, and then I still am asked for the keyring password once I log in.

Thoughts?


I've had the same problem (after using patches from bugzilla). Reading This one seems to solve the problem, specifically tha part about /etc/pam.d/system-auth file.

In short you have to add some try_first_pass parameter to that file

Hope this helps you too
_________________
Linux Registered User n. 373835

Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum
Back to top
View user's profile Send private message
meranto
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2005
Posts: 129
Location: Ridderkerk, The Netherlands

PostPosted: Sun Jun 03, 2007 10:32 am    Post subject: Reply with quote

Sachankara wrote:
Skandal wrote:
I've discovered that it doesn't work for me when I use autologin with gdm, when I actually type my password at the login screen it works.
That is understandable as autologin doesn't send any password to gnome-keyring-manager. Autologin doesn't work with any pam module that requires a password.


there is a workaround:

quotes from other fora:

Quote:
Linux4kix
2006-12-05, 07:48 PM PST
Sorry guys I have been a little lax on my forum browsing. I am the current maintainer of pam_keyring and here is what it does/doesn't do.

gnome_keyring_daemon stores secrets in an encrypted keyring file. When you create the file you must provide a passphrase which is used as the key for the encryption algorithm. Without that key you can't unencrypt the keyring file and gnome apps that have stored secrets can't get access to them.

pam_keyring works in the pam stack to take the password you provide to gdm and use that password to unlock the keyring specified, or the default keyring if no keyring is specified. Because this happens before the gnome-session is started a few things have to happen. Pam_keyring launches gnome-keyring-daemon with the same UID as the user authenticating in pam. It then sets up the GNOME_KEYRING_SOCKET environment variable for that user. Finally it runs pam-keyring-tool as the user trying to unlock the default keyring with the password used to login to gdm.

If all goes well a user is logged in and doesn't need to provide a password for gnome-keyring.

This doesn't work for autologin because a password is never supplied to the pam stack. Autologin works because gdm runs as root and can launch a session as another uid without needing a password. Since no password is provided to the pam stack pam_keyring has no password to provide to gnome-keyring-daemon to use to unencrypt the keyring.

Hope that clears some things up.

Jon


however (from ubuntuforum):

Quote:
In order to get around the NetworkManager keyring applet from showing up and requesting your keyring password again, do the following:

Create a script file called autologin by typing in terminal
Code:
sudo gedit /home/'user'/autologin

where 'user' is your username home folder
then enter the following lines
Code:
#!/bin/bash
PATH=$PATH:$HOME/bin
echo 'password' | /usr/libexec/pam-keyring-tool -u -s

replace 'password' with your password i.e. the same password as your login password and keyring password
Save and quit

3. Make it executable by typing
Code:
sudo chmod 755 /home/'user'/autologin

and make sure the file is set to your user and group. Type
Code:
sudo chown 'user' /home/'user'/autologin

and
Code:
sudo chgrp users /home/'user'/autologin


4. Go to System - Preferences - Sessions
select Startup Programs tab
select Add
then browse to the autologin script you just made and add it.
Close.

5. Restart

I hope this helps any out there who have had similar probs and if I have got anything wrong please let me know.
Thanks again to all those whose info I have used in making this how to.


Works like a charm, although not the best solution.
_________________
Linus Torvalds: "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect."
Back to top
View user's profile Send private message
gsra99
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2008
Posts: 81

PostPosted: Wed Feb 13, 2008 12:02 pm    Post subject: pam and gnome keyring Reply with quote

I have got pam and gnome keyring to work when I login without any problems. I have posted my pam configuration files in another post. Here is the link:
https://forums.gentoo.org/viewtopic-t-647906-highlight-pam+gnome+keyring.html
Hope this works for you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum