Mint remembering admin password

Questions about applications and software
Forum rules
Before you post please read this

Mint remembering admin password

Postby viking777 on Wed Jan 28, 2009 8:45 am

I have two copies of Mint Felicia running, one is the XFCE CE version and the other is the standard Gnome edition (but with xfce on top of it). Just recently I have noticed that they are both remembering admin passwords for a long period, and I am pretty sure they didn't used to do that. This could be a result of my messing about with them (which I do a lot) or maybe the result of some update recently I don't know which. When I first log in and attempt to run a program that requires admin access such as synaptic I am asked for my password, but that is it. After that point I can launch any program at all with admin privileges without being asked again to enter the password. What is more it doesn't make any difference if I log out then log in again, the password is never requested again until I actually reboot.

Whilst this is extremely convenient, it is not particularly safe, so how can I alter this behaviour so it prompts for a password more often?

EDIT. Forgot to say this only happens when working from the gui (ie launching programs from the menu or from shortcuts). If I attempt to launch synaptic from a user shell it starts without admin privileges. Gparted for example refuses to run unless I use gksu - which is as it should be).
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Linux Mint is funded by ads and donations.
 

Re: Mint remembering admin password

Postby garda on Wed Jan 28, 2009 10:06 am

I believe it's caused by some sort of a bug in the sudo package. Have you updated your system lately? If not, try to update.

You can, alternatively, try to modify sudo timeout setting in your /etc/sudoers file. But you will be on your own if you find this workaround disastrous. *Disclaimer alert*

As a reminder, you should modify your sudoers file with and only with this command:
Code: Select all
export EDITOR=gedit && sudo -E visudo


Hope that helps.
User avatar
garda
Level 5
Level 5
 
Posts: 744
Joined: Sat Aug 30, 2008 2:55 am
Location: /root

Re: Mint remembering admin password

Postby viking777 on Wed Jan 28, 2009 1:04 pm

Thanks garda, your post pointed me in the correct direction.

On my XFCE CE edition all I needed to do was to edit 'sudoers' to include the line

Code: Select all
timestamp_timeout=1
(in the section defaults and seperated from any other entry by a comma)

I checked this with

Code: Select all
visudo -c
and it parsed correctly and solved the problem.

I then booted into the gnome version (which has exactly the same version of sudo) but every time I edited the sudoers file it complained that the 'timeout_timestamp' option was unknown and 'visudo -c' failed its sanity check.

I then decided to copy and paste the 'sudoers' file from my XFCE edition to my Gnome edition and surprisingly that worked perfectly. I find it impossible to explain the difference between the two, however the copy and paste solution now means that I have both systems working as they should.

Thanks for your help.
Last edited by viking777 on Wed Jan 28, 2009 1:49 pm, edited 1 time in total.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: Mint remembering admin password

Postby garda on Wed Jan 28, 2009 1:25 pm

No problem, viking777. Glad I could be of any help.

I strongly recommend, however, that you replace that timeout_timestamp=0 flag with this one instead:
Code: Select all
timestamp_timeout=0

to prevent latent issue with gaining administrative rights from emerging in the future.

Here is a sample from my Linux Mint Main sudoers, to be clearer:
Code: Select all
Defaults   !lecture,tty_tickets,!fqdn,timestamp_timeout=1
User avatar
garda
Level 5
Level 5
 
Posts: 744
Joined: Sat Aug 30, 2008 2:55 am
Location: /root

Re: Mint remembering admin password

Postby viking777 on Wed Jan 28, 2009 1:55 pm

I beg your pardon garda, I inadvertantly reversed the order of the words when I made that post. I have edited them now just in case anyone else copies it.

Code: Select all
timestamp_timeout

is what I edited into 'sudoers' and that is what it should be as you correctly stated.

I also changed it to =1 just in case that makes any difference.

Thanks once again - I must be more careful with my posts!
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am


Return to Software & Applications

Who is online

Users browsing this forum: arunciblespoon, johanteekens and 27 guests