Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-08-2003, 01:03 AM
|
#1
|
LQ Newbie
Registered: Aug 2003
Location: KL
Posts: 14
Rep:
|
Using Sudo
I want to give myself root permissions by using sudo but I've been stuck at configuring the sudoers file.
Does anyone know how to configure sudo so that each time i log in i will have root permissions?
|
|
|
08-08-2003, 01:16 AM
|
#2
|
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440
Rep:
|
Yea, that's easy...in the sudoers file they already gave some examples of usage. So anyhow, lets say your username is "johnnie". You would add this line:
johnnie ALL=(ALL) ALL
If you noticed, root has that exact same line. That's it...you're done.
Of course you can't run root commands by just typing in the command. You have to put "sudo" before the command.
-twantrd
|
|
|
08-08-2003, 01:27 AM
|
#3
|
LQ Newbie
Registered: Aug 2003
Location: KL
Posts: 14
Original Poster
Rep:
|
can i have privilages that allow me to do more things other than run commands? for example view directories or change system settings without using terminal?
|
|
|
08-08-2003, 04:15 AM
|
#4
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
Quote:
Originally posted by frostbite
change system settings without using terminal?
|
It is not a good IDEA for a USER to change system settings. this is what ROOT is for.
|
|
|
08-08-2003, 09:17 AM
|
#5
|
Member
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569
Rep:
|
Actually I prefer the line:
Code:
username ALL = NOPASSWD : ALL
And then you never have to enter in a password.
However, sudo is only for terminals, though there are other graphical apps that allow you to su in an X environment, like gnomesu and kdesu.
|
|
|
08-08-2003, 03:22 PM
|
#6
|
LQ Newbie
Registered: Aug 2003
Location: KL
Posts: 14
Original Poster
Rep:
|
because i am the root, but i dont wanna log in using root, wanna use my name instead so i kinda have a nice home folder with my name in it and stuff
|
|
|
08-08-2003, 06:55 PM
|
#7
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
If you search the board, it's been covered reluctantly a few times. It's really really really not a good idea. You'll be logging in as root everyday in such a situation, and then there goes half your safety net! Unless you are an uber-guru, which even then you would realize how bad it is and not do it, you shouldn't give a user all of root's priv's. Using the sudoers file is the closest I'd think one should come to doing so.
And as a side note to my above statement: If you were that guru who decided to, you'd by that time know how
Cool
|
|
|
08-09-2003, 04:13 AM
|
#8
|
Member
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569
Rep:
|
There's nothing at all wrong with granting the "normal user" that you (the actual owner and admin of the machine) "effective root" every time they log in by using the sudoers line I posted above. The only slight difference in security is that if someone can pop into your normal user's account, they can root your box. But if that's happening, you have other more serious problems already than having sudo set up the way it was. I actually highly recommend using sudo the way I described above. It makes doing admin tasks rather easy without making it so braindead as to not know what you are doing.
Note: this is the only way I advocate giving "effective root" (passwordless even) to any normal user. Setting your UID to 0 or something stupid like that, however, is ... just that, stupid.
|
|
|
All times are GMT -5. The time now is 05:48 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|