How do I give root privileges to a user in Linux?

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

How do I give root privileges to a user in Linux?

Post by Chris Corbyn »

Hi,

Just installed SuSE 9.1 and I'm totally new to linux but I was wondering how I could give my main user root privileges. Basically, I don't want to have to log in as root everytime I want to install packages or go into the root folder.

Also, I can view my windows partition but it's read only and even logged in as root it won't let me uncheck the read-only box in the KDE interface. Can I do this from console?

Cheers :-)
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Use sudo or fakeroot
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

If your Windows partition is using NTFS, you can and should forget about being able to write to it. IF it is FAT32, you are fine.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

So I can't just add root privileges from the command line? I need to have 3rd party software installed?

(I'll get sudo if that's what I need.)

Thanks
ody
Forum Contributor
Posts: 147
Joined: Sat Mar 27, 2004 4:42 am
Location: ManchesterUK

Post by ody »

you can add yourself to the root group, which will give you a degree of "rootness", however its pointless, the root account is there for a reason, when the reason arrises.
d_d
Forum Commoner
Posts: 33
Joined: Wed Jul 07, 2004 4:56 pm
Location: UK

Post by d_d »

User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Yes, if you don't know "su", then I can see your pain, but "su"'ing over to root isn't bad and takes little time.

As a normal user, type "su -" will ask you for root's password and break you out of your shell.

Then "exit" will return you to your user where you left off.
Last edited by Pyrite on Mon Aug 16, 2004 6:10 pm, edited 1 time in total.
ody
Forum Contributor
Posts: 147
Joined: Sat Mar 27, 2004 4:42 am
Location: ManchesterUK

Post by ody »

Pyrite wrote:Yes, if you don't know "su", then I can see your pain, but "su"'ing over to root isn't bad and takes little time.

As a normal user, type "root -" will ask you for root's password and break you out of your shell.

Then "exit" will return you to your user where you left off.
"root -" ??

I assume you mean "su -", also ctrl+d will log you out; which is quicker than typing exit.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

You're right I did mean su - haha, fixed that, and ctrl+D is not faster on my laptop. In fact on any computer I can type exit faster than hitting a key sequence. Who cares anyways ...
User avatar
redhair
Forum Contributor
Posts: 300
Joined: Fri May 30, 2003 4:36 pm
Location: 53.23N-6.57E
Contact:

Post by redhair »

You just need to get used to using the root password stuff.
It is a security feature which was not invented for no reason.
Imagine you go to the store....do you leave your frontdoor open "because when you get back, you got your hands full"?

Also, once you installed all your desirable software....you don't have to use the root pass anymore...just work through it ;-)

ps: With Yast you can install a bunch of software at the same time, and just enter the rootpass once!
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Thanks that helps me alot :-)
ody
Forum Contributor
Posts: 147
Joined: Sat Mar 27, 2004 4:42 am
Location: ManchesterUK

Post by ody »

Pyrite wrote:You're right I did mean su - haha, fixed that, and ctrl+D is not faster on my laptop. In fact on any computer I can type exit faster than hitting a key sequence. Who cares anyways ...
What kind of hand malformations do you have?

One hand two fingers or both hands, 2 fingers on one and 3 on the other to logout... hrmm I'm willing to wager my gf you can do it quicker my way. :roll:
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Is she a redhead? :D
ody
Forum Contributor
Posts: 147
Joined: Sat Mar 27, 2004 4:42 am
Location: ManchesterUK

Post by ody »

nah, I've been thinking about trading her in though..
Post Reply