How do I stop Ubuntu from asking for passwords all the time?

Asked by kenbb99

What settings do I change so that Ubuntu doesn't ask me for passwords for anything? I don't want to get asked for passwords -- ever --. I want to have privileges to edit files, log on to my LAN, view menus that aren't grayed out (authenticated, unlocked), etc. automatically, every time I boot up.

I've tried various solutions but have had three general problems: 1) the solutions are aimed at solving the password issue in just one situation and there appears to be hundreds of situations, 2) the solutions don't work, 3) I try any minor thing I haven't done before and I get asked for a password in a place I haven't seen before.

I am very new to Ubuntu (I'm trying to be a former Windows user) and I've spent about 6 hours over the past few days researching, starting applications, entering passwords, making changes, rebooting, entering passwords, etc. to no avail. I get asked for just as many passwords as ever.

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
kenbb99
Solved:
Last query:
Last reply:
Revision history for this message
Alex Cockell (alcockell) said :
#1

Linux works on the principle of Least Privilege Required; you do not need full admin privileges while browsing the web, sending email, playing games, writing documents and the like. If you are able to do anything on the machine, then any program running as you is able to do them as well.

Temporary privilege elevation allows you to only run as root when it is absolutely essential to.

Revision history for this message
Avinash.Rao (avinash-aol) said :
#2

For security reasons, administrative tasks in Ubuntu can only be performed by users with special administrative privileges.

Administrative access can be given to individual users, who can use the sudo command to perform administrative tasks. The first user account you created on your system during installation will, by default, be able to perform administrative tasks.

When you run an application that requires administrative privileges, you will be asked to enter your user password. This ensures that rogue applications cannot damage your system, and serves as a reminder that you are about to perform administrative actions which require you to be careful!

All of the default graphical configuration tools in Ubuntu already use sudo, so they will prompt you for your password if needed.

Each time you type your password, the system remembers it for 15 minutes so that you do not have to type it again.
For more information on the sudo program and the absence of a root user in Ubuntu, read the sudo - https://help.ubuntu.com/community/RootSudo page on the Ubuntu wiki. You will find how to remove password prompt for sudo.

But, i suggest you don't enable root user nor disable password prompt for sudo.

Your case depends on how you've created the user you have used to login and what privileges they have! If they are a part of the administrator group they can perform administrator task or administer the system.

I find Ubuntu very easy compared to other versions, please spend some time reading the documentation and you will find answers for most of things.

Good Luck
Avinash

Revision history for this message
kenbb99 (kenbb99) said :
#3

I am aware of the rationale for asking for passwords all over the place. I don't want to get any passwords. I have read lots and lots of documentation and found answers to a lot of things. I still have not found an answer to this question.

Revision history for this message
Jensen Somers (jsomers) said :
#4

Technically you can use the "root" account for everything and "forget" about your current user account. You will have to enable this at the login screen though.

First, you need to make sure that your root account has a password.
$ sudo -i
$ passwd root

Assuming you are using Ubuntu you need to edit the file /etc/gdm/gdm.conf. In it you will find the line "AllowRoot=false". If you change that to "AllowRoot=true" you will be able to log in as root, and nothing should as you for your password again. The home folder will also change from /home/<yourusername> to /root, so take that into account.

However, this creates a lot of security issues. Changes are that, sooner or later, you will brake your system. The forums are filled with similar cases as this is just not the way to go.

Revision history for this message
kenbb99 (kenbb99) said :
#5

Thanks. I will try this. I am coming from a Windows XP environment in which I am logged in as Admin all the time and I have not broken my system in at least 10 years. I recognize that I am risking braking my system. I would prefer to go another way than logging in as root, but no one has suggested anything except you.

Revision history for this message
Jensen Somers (jsomers) said :
#6

I forgot to ask this in my previous answer.

What are you doing that you must enter your password all the time? The only time I enter my password is at the login screen - which can easily be disabled - and when I explicitly want to perform a task as root. But that doesn't happen so often, only when I want to install new software or the package manager wants to do an update. I can go for weeks without entering my password.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#7

We repeat is strongly suggested to don't work as root.

http://en.wikipedia.org/wiki/Comparison_of_Windows_and_Linux#Permissions

"I am coming from a Windows XP environment in which I am logged in as Admin all the time and I have not broken my system"

You can't broke, was not already under your control, due closed source software.

http://en.wikipedia.org/wiki/Comparison_of_open_source_and_closed_source#Security

Hope this helps

Revision history for this message
kenbb99 (kenbb99) said :
#8

Jensen:

Most recently I am trying to set up my USB wireless adapter. I had to type in my password a lot to use the package manager to download files, move driver-related files to various directories, edit various files with privileged access, etc. I can't the adaper to load the necessary files automatically at log in; I have to type a password. I have tried many solutions to this suggested in various forums but none of them have worked so far. Besides having to sudo iwconfig to get the adapter to work, I have to type in passwords several times in various places to edit files, change settings, etc. to try the various solutions. I have also been configuring access to LAN disk resources. Working to configure this requires me to type in passwords a lot, and I have to type in a password the first time I access the network drive.

As Avinash.Rao mentioned above, it appears that the system remembers my password in certain cases for just 15 so I have to re-enter it again in for some of the same tasks.

marcobra:

I understand that it is strongly suggested not to work as root. I would like to do something else to avoid the password requests from the system, but no one else has suggested anything. I would have to disagree as to whether you can break what is not under your control. People break their XP systems all the time. I'm not sure about the purpose of the Security reference in Wikipedia. It seems to argue as much that closed source is more secure than that open source is.

Revision history for this message
Tony Mugan (tmugan) said :
#9

We got a rootkit at work recently because someone visited a national newspaper site that had been hacked.
Because the user was running WIndows XP with admin rights on the machine, this hack was able to "infect" the machine by installing malware.

In linux, the user would have been prompted by the system that some process was trying to do something which required admin privileges.

We patch the machines regularly and have a firewall enabled with a resident virus checker but none of these measures could defend against this zero-day exploit.

In short, I recommend getting used to entering a password as a checkpoint for security.

If you don't that Nigerian General may not have to ask you what your bank details are :)

Regarding your question, I don't know how you can circumvent the innate security in Ubuntu and I'd feel a bit like I was assisting in a back-street surgery if I did.

Revision history for this message
kenbb99 (kenbb99) said :
#10

Jensen:

I tried setting up sudo -i and had to enter my password two out of the first four times I tried to do anything related to setup and configuration. Without sudo -i this it would have been three out of three. I realize that this is not a large sample, but I think it is representative of what I typically do. A minor improvement, but not what I'm looking for. This would still result in dozens of password prompts per day. I'm not quite ready to throw in the towel, so I guess I'll keep looking.

One of the reasons I'm trying to get Ubuntu to work for me is that I don't want to just get used to something I don't like. I've read that this is one of the advantages of Linux - I can configure it the way I want. I keep reading here and elsewhere that Ubuntu is dangerously insecure if I set it up with no passwords (assuming I can - lots of people have hinted that I can but everyone says they're forbidden from telling me how. Lots of people have told me how to set up my wireless device and none of their advice has worked, so far). My understanding is that the vast majority of people login to XP with admin privileges and no passwords and most don't even know it. I believe that the vast majority of these people never run into a virus / trojan / root kit problem. From the admonitions I received, it sounds like Ubuntu with no passwords would be less secure than XP with admin and no passwords. This is not what I expected.

I don't want to put my system at elevated risk. I do want to eliminate the literally dozens of password prompts I get every day.