LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can I avoid Having to type in root password over and over again on Fedora 14? (https://www.linuxquestions.org/questions/linux-newbie-8/can-i-avoid-having-to-type-in-root-password-over-and-over-again-on-fedora-14-a-869874/)

WTFsandwich 03-20-2011 09:13 PM

Can I avoid Having to type in root password over and over again on Fedora 14?
 
I was curious if there's some way I can automatically give my account root privileges on login or something.

The reason I want this, is that I'm sick of having to type the root password every time I want to do something.

This is a pretty fresh install, so I'm already tired of typing it every time I try to install software and the like.

Any help would be great, thanks.

savona 03-20-2011 09:24 PM

Quote:

Originally Posted by WTFsandwich (Post 4297562)
I was curious if there's some way I can automatically give my account root privileges on login or something.

The reason I want this, is that I'm sick of having to type the root password every time I want to do something.

This is a pretty fresh install, so I'm already tired of typing it every time I try to install software and the like.

Any help would be great, thanks.

You can put your user account into sudo, but you will still have to type sudo before the command.


type visudo at the command line as root.

find this line:
# %wheel ALL=(ALL) NOPASSWD: ALL

Add this line under the line above: (replace username with your user account name)
username ALL=(ALL) NOPASSWD: ALL

WTFsandwich 03-20-2011 09:44 PM

Nearly all of the times it asks for the root password, it's not while I'm working in the terminal. It's mostly installing software, making some minor system changes, both of which I've been doing with GUIs.

If I add myself to the sudoers file, will it stop the prompts even outside the terminal?

mark_alfred 03-20-2011 09:57 PM

Try using gksu (if Fedora has it). I think after logging in as root once with it, that you don't have to keep entering the password.

anishkumarv 03-20-2011 09:57 PM

Hi

Are you using GDM or KDM?
In KDE, with KDM, open the control panel and go down to 'system administration', under that select 'login manager' and click 'administrator mode' (unless you are root already). From there you can enable auto-login and password-less login for certain users.
For GDM, you can edit /etc/gdm/gdm.conf and you probably can find an option to allow that somewhere.
I would strongly reccommend that you do not do that, as logging in as root automatically, and without a password esentially bypasses all the security on your system (except perhaps a firewall), so anyone who has physical access ro can hack into it from the web can see, execute, and modify everything on your computer. If you want the convenience of auto-login, do so as a normal user, and actually you should use only a normal user for almost all tasks.

WTFsandwich 03-20-2011 10:08 PM

I mispoke. I don't want to be logged into the root account per say, just, I want my username to have root privileges for simple tasks, like installing software, without me having to type it in every time.

Also, Fedora doesn't seem to have gksu.

syg00 03-20-2011 10:40 PM

How are you installing the software ?. If you use System -> Administration -> Add/Remove Software you should only need to toss in the root password once per session. Do it all at once.
Else use "su -c <whatever>", or just "su -" then have at it. Depends on the situation. I don't find Fedora particularly onerous in this regard.

As regard gksu, try "beesu".

LAPIII 12-24-2011 11:38 AM

I've been looking for the same thing, but for Debian.
 
Try: Stop Telling sudo Your Password and Useful Tricks Forever: Change the GRUB Menu Timeout on Fedora 14, Fedora 15 .

This is from a comment in the first link: 'sudo -S "your command" < ~/.mypasswd' where ~/.mypasswd contains your password should do the trick. Ensure that only you can read / write to ~/.mypasswd.

I've not tried these, but please tell me what works best.


All times are GMT -5. The time now is 08:16 AM.