Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-21-2003, 10:21 PM   #1
LQ Newbie
Registered: Jun 2003
Location: Papillion, Nebraska
Distribution: Mandriva 2006
Posts: 27

Rep: Reputation: 15
Logging In as root

what do you type in while your in a terminal to get root privileges?
Old 07-21-2003, 10:43 PM   #2
LQ Newbie
Registered: Jul 2003
Distribution: Suse 8.2
Posts: 5

Rep: Reputation: 0
If you are waiting at a login prompt then type in root. It will then ask for a password. I think that you probably mean when you are already logged in as Joe User and want to do something as root.

Type in su (this is the switch user command)
it will ask for a password

and there ya go! You are now root.
Old 07-22-2003, 02:41 AM   #3
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30

you could also use:
su -

which takes you to the root home dir (just like you would login as root), and, IMHO very useful option,
su -c 'command'

which will prompt you for the password and execute the desired command with root privileges.

Old 07-22-2003, 02:54 AM   #4
Senior Member
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,692
Blog Entries: 9

Rep: Reputation: 45

It looks like you have the mandrake 9.1 default set.

If you want to do command line stuff, then just open a terminal and type the "su" command then put in your root password (as mentioned in the others posts) - you will see the change in the prompt.

If on the other hand, you want to do stuff in gui mode, then you will probably have the default set up where root is a hidden user - not a problem, but to "unhide" root for graphic login,

log in as your user, and presuming that you are using KDE for your desktop, then "K"menu>configuration>control centre (kde control centre, not mandrake control centre)

once the control centre is open, system>login manager. To unhide root, at the bottom of the login manager dialogue click on the "administrator mode" button, when it has finished loading, un check the box for root being a hidden user (you should only then have "nobody" left checked as a hidden user I presume that you could delete nobody if you want, but I havent tried that!) then close the control centre.

You should now have root showing as a login option when you are logging in or changing login from the "K" menu.


Old 07-22-2003, 01:36 PM   #5
LQ Newbie
Registered: Jun 2003
Location: Papillion, Nebraska
Distribution: Mandriva 2006
Posts: 27

Original Poster
Rep: Reputation: 15
ok thanks thats whaty i wanted to know i kindof blanked out and forgot what to do
Old 07-22-2003, 02:52 PM   #6
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 144

Rep: Reputation: 15
Also, as one more option, if you only want to run one command and not leave yourself logged in as root for a long time (which can be a security hazzard) you can type in 'sudo command' command being whatever command you may want to issue. You will then be prompted for the root password.
Old 07-22-2003, 03:00 PM   #7
Registered: Dec 2001
Location: Netherlands
Distribution: redhat suse mandrake freebsd
Posts: 344

Rep: Reputation: 30

Yes bluethundr is right about sudo, it is quite handy, but
you might have to edit the /etc/sudoers to add the wanted
commands and/or users.
man sudoers will give you some info on that

good luck


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
logging in as root M O L8ingN2dust Ubuntu 24 01-16-2006 04:49 PM
Logging in as Root The Oate Mandriva 15 08-02-2004 02:44 PM
Logging in to Root NathanCohen2003 Linux - Software 3 07-10-2004 04:11 PM
Logging in as a root??? FastSwimmer Mandriva 4 03-01-2004 04:05 AM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 02:55 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration