disable password for updates (solved via policykit file)

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
mkiker2089
Level 1
Level 1
Posts: 23
Joined: Thu Sep 29, 2016 6:49 pm

disable password for updates (solved via policykit file)

Post by mkiker2089 »

Another newbie question and again I did search. I got answers from faking a policykit to a seemingly unrelated way to unlock Sudo.

I just want a simple way to allow updates without a password. I realize why the password is there but Linux asks for it so much that it's as bad as not having one at all. I set the password manager to only show level 2 safe updates and it's all from safe sources. Now I just want it to let me install the updates when they show up.

Is there a way to have it autoinstall level 1 and 2 updates?

Thanks, this is my first real attempt at Linux since the late 90s when Red Hat was trying to get into the consumer market.
Last edited by mkiker2089 on Thu Sep 29, 2016 11:02 pm, edited 1 time in total.
Cosmo.
Level 23
Level 23
Posts: 17817
Joined: Sat Dec 06, 2014 7:34 am

Re: disable password for updates

Post by Cosmo. »

mkiker2089 wrote:I just want a simple way to allow updates without a password.
A bad idea. The password is your protection against infiltrating bad software without your knowledge.

I wonder, how removing the password for updates would help much. There are updates not so often available, especially if you only selected level 2 (hopefully you mean level 1 & 2, otherwise the update manager will sooner or later fail to work).

At now there is no possibility to auto-update level 1 & 2. A later version of Mint might possibly introduce this feature.
User avatar
ColonelPanic
Level 1
Level 1
Posts: 9
Joined: Wed Sep 28, 2016 11:44 am

Re: disable password for updates

Post by ColonelPanic »

Open your text editor as root. (My text editor is xed.)

Code: Select all

gksudo xed

Paste in these lines.

Code: Select all

# Allow any user to check for new system updates
#  without requiring user authentication. 
Cmnd_Alias UPDATE = /usr/lib/linuxmint/mintUpdate/checkAPT.py 
ALL ALL = NOPASSWD:UPDATE

Save the file as /etc/sudoers.d/mintupdate
Reboot, or logout.
currently installed - LM 18 Cinnamon
mkiker2089
Level 1
Level 1
Posts: 23
Joined: Thu Sep 29, 2016 6:49 pm

Re: disable password for updates

Post by mkiker2089 »

Cosmo. wrote:
mkiker2089 wrote:I just want a simple way to allow updates without a password.
A bad idea. The password is your protection against infiltrating bad software without your knowledge.

I wonder, how removing the password for updates would help much. There are updates not so often available, especially if you only selected level 2 (hopefully you mean level 1 & 2, otherwise the update manager will sooner or later fail to work).

At now there is no possibility to auto-update level 1 & 2. A later version of Mint might possibly introduce this feature.
Passwords have to suit ergonomic needs. When too many password prompts are given users will either make the password easy, which I have already done, and stop reading why they are asking for a password. It's the digital equivilant of crying wolf. When a real security issue comes up people won't believe it because they are used to Linux Mint asking for passwords every time you touch the keyboard.

I set my source to be ones in the given repository and set the level to be 1 and 2 only. I see no danger here unless Linux sends bad updates in which case I'd just put in my pass and get the bad update anyhow.
mkiker2089
Level 1
Level 1
Posts: 23
Joined: Thu Sep 29, 2016 6:49 pm

Re: disable password for updates

Post by mkiker2089 »

ColonelPanic wrote:Open your text editor as root. (My text editor is xed.)

Code: Select all

gksudo xed

Paste in these lines.

Code: Select all

# Allow any user to check for new system updates
#  without requiring user authentication. 
Cmnd_Alias UPDATE = /usr/lib/linuxmint/mintUpdate/checkAPT.py 
ALL ALL = NOPASSWD:UPDATE

Save the file as /etc/sudoers.d/mintupdate
Reboot, or logout.
That didn't work. I see the updates but to install them I still get a password prompt.

edit - it says synaptic package manager is asking for the update.
mkiker2089
Level 1
Level 1
Posts: 23
Joined: Thu Sep 29, 2016 6:49 pm

Re: disable password for updates

Post by mkiker2089 »

Never mind, I found an answer on this page. The first answer didn't work but then I copied in the huge answer lower down and it worked. I'm not sure why.

It would be nice if Linux would adopt a more user friendly approach to passwords. Let us opt out of the least risky stuff. I get why the software manager has a password but since most of the time people are just looking to install solitaire it's a bit cumbersome.

http://askubuntu.com/questions/98006/ho ... a-password
Cosmo.
Level 23
Level 23
Posts: 17817
Joined: Sat Dec 06, 2014 7:34 am

Re: disable password for updates

Post by Cosmo. »

mkiker2089 wrote:Passwords have to suit ergonomic needs. When too many password prompts are given ...
Passwords are never ergonomic. With an update perhaps once or twice per week I cannot follow, that there are "too many prompts".

Regarding your "solution": In case there should happen at any time a corruption in your system remember, that you allowed it by will. You bear the consequences yourself. In this case you are responsible for it, not Linux.
mkiker2089
Level 1
Level 1
Posts: 23
Joined: Thu Sep 29, 2016 6:49 pm

Re: disable password for updates (solved via policykit file)

Post by mkiker2089 »

Cosmo, the issue isn't that it's just updates that ask for a password. It's required to add solitaire, change the time zone, etc.. People stop thinking of passwords as for their safety and start seeing linux as just being paranoid and annoying.

I still fail to see how passwording level 1 and 2 updates is safer anyway. People choose the update based on the faith that Linux knows what they are sending. I don't know what half (less) are so I just install the ones labeled safe from sources also given to me from a repository.

No, updates aren't a hassle alone. It's just that Linux needs to learn to be a little more user friendly. There is a balance between unsafe and hedonistic. Mac's are considered safe and they don't ask for passwords all the time. Window's big failure isn't the password feature it's the fundamental design that allows drive by installs and modifying of the registry.

Anyway, we won't agree on this. Hopefully as a newbie I can learn and start to influence the Linux makers one day. Soon enough a balance will be reached.

Just my opinion though. I'm one of the rare Windows user that has never had viruses or corruption so hopefully I can continue this with Linux.
DeMus

Re: disable password for updates

Post by DeMus »

mkiker2089 wrote:It would be nice if Linux would adopt a more user friendly approach to passwords.
Ah, you mean Linux should become Windows where every idiot between chair and keyboard is administrator by simply clicking a mouse-button?
Any idea why Windows is so vulnerable for everything? Well? This is one of the reasons, next to bad code.
Let Linux stay Linux. If you really need to type your password so many times you are doing something terribly wrong. I hardly have to type it, just occasionally when there are updates, or when I do install a new program. And I am happy to do it cause every time I do so it reminds me of how safe Linux is compared to the other OS.
Cosmo.
Level 23
Level 23
Posts: 17817
Joined: Sat Dec 06, 2014 7:34 am

Re: disable password for updates (solved via policykit file)

Post by Cosmo. »

mkiker2089 wrote:Cosmo, the issue isn't that it's just updates that ask for a password. It's required to add solitaire, change the time zone, etc.
It is not my fault, that you wrote in the title explicitly "for updates"; also the complete starting posts names nothing else. I also cannot follow, that you have to install solitaire more than once and change the time zone on a regular basis. Unbelievable.

Passwords are the protection of the system. Passwords have never been invented for making anything more user-friendly. They are protecting the system. Your so called "solution" does not only work for level 1 & 2 updates (as your own above quoted examples demonstrate), it makes the system vulnerable. "Paranoid" is it, if you believe, that vulnerabilities and attacks do exist exist for all people except only for you not. Unbelievable.

Linux has learned how to make systems by design secure, and that for several ten years. Unbelievable, that a self-declared newbie believes, that he has the better insight.

Once again: Of course you can do on your system, whatever you want. Even those changes, which are not acceptable out of security aspects. But in case your system should ever get corrupted or attacked: Blame yourself. You made it possible. And you cannot even say, that you where not informed.

One word at the end: A newbie has - by definition - to do some more administrative tasks for setting up his system, as they are usually needed in the average of a week or a month. You can ask an experienced Linux user, whomever you want: If you tell him, that ...
mkiker2089 wrote:Linux Mint asking for passwords every time you touch the keyboard.
then the reply "Totally untrue" is the least reaction that you get. Your argumentation contradicts the simplest facts. Don't expect, that you can convince anybody with such fantasies.
mkiker2089 wrote:Hopefully as a newbie I can learn
Hopefully.
User avatar
MartyMint
Level 7
Level 7
Posts: 1620
Joined: Thu Dec 27, 2012 10:50 pm

Re: disable password for updates (solved via policykit file)

Post by MartyMint »

I was on my computer yesterday for a total of about 5 1/2 hours.

I think I needed to enter my password a total of two times.
DeMus

Re: disable password for updates (solved via policykit file)

Post by DeMus »

Uptime: 6 1/2 hours: not once did I need to type the password.
Again, if you do need to type it on a regular basis then you are doing something wrong.
mkiker2089
Level 1
Level 1
Posts: 23
Joined: Thu Sep 29, 2016 6:49 pm

Re: disable password for updates (solved via policykit file)

Post by mkiker2089 »

I'm coming in from the perspective of setting up multiple machines multiple times to learn the basics so you are right that updates won't happen often to other people. To me it's more a matter of principle. I think people should be allowed to install updates without a hassle. I even think level 1 if not level 2 updates should be set to safe.

That said I will take the humble pill and thank those who point out the security issue. I was safe with Windows due to using an anti-virus, never trying to get stuff for free that shouldn't be free, and always doing custom installs of everything. I never used a password and set myself as admin even disabling much of the security. That said Linux has security that Windows can't even dream of.

I'm certain after the initial set up I won't see password prompts very often and for my less tech savy family I can simply tell them that if they see a password it isn't a sign of an issue, just the computer asking them if they are sure they want to change the way it is set up.

Again thank you all for the advice. Being a noob chances are I may indeed toast a machine in the learning process. I consider myself a Windows expert but as far a Linux goes I'm the equivalent of just poking it with a stick to see if it's still alive.
Post Reply

Return to “Newbie Questions”