Run admin functions without a password

I am the only one who has access to my computer.

I believe you guys and gals probably agree, our time is valuable.

I would like there to be NO prompt for a password for things such as Gparted etc.

I set my password timeout to -1, but I am still asked for my password. ??

What the "firetruck".

Any help would be greatly appreciated.

Thanks.

I would guess you would have to open caja as sudo, find the application and change the permissions from root to your user name.
Gparted is in usr > sbin, but I am not about to try that myself.

I do believe there is also a command to take ownership. I know I use that when I put an application in opt. I think it is a 'sudo chown' command but someone with more knowledge than me would have to give you the correct command.

1 Like

The best practice of disallowing root login has been in place for decades. It not only protects your computer from potential hacks, software bugs and intruders, but also protects you from yourself. Suppose you were at a terminal session as root and your current working directory was "/". Perhaps you saw some junk files there and in a fell swoop decided to erase them with a single commnad: rm -rf *. Oops. You've just trashed your system. As a regular-level user, you couldn't do that.

It takes less time to confirm a deletion, or to enter your password than it does to rebuild your system.

I suggest that rather than try to circumvent the security that has been (and still is) one of the features that makes Linux (and Ubuntu) a viable, secure computing platform, that you read up on sudo and the sudoers file (and the GUI equivalent, gksu).

Like you, I am the only user of my system. But it is connected to the Internet. I run a number of security and malware detection programs, but I don't for a minute think my machine is invulnerable. The only was to ensure that is to disconnect. Um, no.

What I have done is to create some "wrapper" scripts that embed the sudo command in them. It's possible even to embed my password in them so the script doesn't prompt me. That is NOT a recommended practice, but if you're a risk-taker, it's something you could do. Create a script, maybe add a UI with yad or zenity, make a launcher for it, and then you have the solution to your "problem."

4 Likes

Excellent advice. Sudo is there for a reason and I would not disable it, but some people only learn the hard way.

1 Like

The command @jymm is referring to is the "change owner" command (chown). While I'd be hesitant to change the owner account of an app or system process, it might be possible to "align" the group owner with your account. chown can be used to change a file's group as well as the user's ownership by issuing the command

chown user:group file or chown -R user:group folder

running the id command in a terminal session will show the group(s) your account belongs to. Using the above would let you change the user AND group ownership (you'll have to run it via sudo)

The better options is to use the chgrp command, like so:

sudo chgrp groupname filename

Personally, I'd take the opposite approach and add my user account to the same group that "owns" the program. For this, you could user the usermod command with the -aG options. This appends the user to the root group without removing them from other groups. For example:

sudo usermod -aG root username

This will add username to the root group. And may solve your "problem." It still makes your account vulnerable to error or enmity, but that's on your shoulders.

3 Likes

People will hate me for saying this.

Andy, what you want is root level access at all times.

That state involves, not HIGH, but EXTREME risk!

If you feel comfortable enough to accept that risk, and the consequences, then there is a simple answer:

set the UID of you login ID to 0, i.e. root, instead of the default 1000. You could risk to do the same for your GID as well for your group, but I think that would be a "bridge too far", in that you would never be able to distinguish between system-originating, and Andy-originating files.

The system will then always refer to you as root, but you will be able to do anything an everything you want, without the need for sudo.

NOW, here is the GOTCHA!

Some OSs have built the concept of the need to use sudo, so tightly into their system, that you will NOT be allowed to perform regular tasks which configurations based on SUDO block from being performed by ROOT !!!!

So, you need to find a special distro that has cast the entire concept of sudo aside. Nowadays, those would be few and far between, given the 30+ years of security-driven efforts to precisely construct the approach that sudo-based.

So, there is the background, and there is the solution, and there is the problem.

I can only wish you well in trying to find the provider of the solution that will work for you.



You could also entertain installing a "server" distro, onto which you could install a Desktop Manager for the ROOT account, and login directory as ROOT. After all, you are the only user, right?

Again, doable ... but HIGH-RISK !!!

3 Likes

...some people only learn the hard way, but hard lessons learned are well remembered!

1 Like

I decided to not proceed with disabling the need to supply a password.

It does not take long to type in my password.

1 Like