LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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

Reply
 
Search this Thread
Old 08-16-2010, 10:04 AM   #1
jaber_6010
LQ Newbie
 
Registered: Aug 2010
Posts: 10

Rep: Reputation: 0
Smile Defining a root on a just installed ubunt netbook edition


Hi everybody!
I just installed an ubuntu netbook edition on my notebook. In the installation process I defined a user with a password. I can use that password to access many system tools, like the synaptic package manager, adding users and so on..

However, when I wanted to do some staff in a terminal as a superuser (using the su command), and I enter my password (There is only a single user and a single password so far) I get authentification failure.

I went to System-->Administration-->uers and groups . I changed the my account type to an "Administrator" (for that I used again my password). hoping that I can use the su command but still it did not work..

I feel that the superuser needs to be set or defined. Since I have not done that then whatever pass word I enter after the command su I will always get "authentification failure"

How can I define the superuser and tell the system that I am the superuser of this computer?
 
Old 08-16-2010, 10:09 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 111Reputation: 111
if you want to run any command as super user you can use sudo command.

Code:
sudo command
if you want to set root password

Code:
sudo /usr/bin/passwd root
HTH
 
Old 08-16-2010, 10:15 AM   #3
jaber_6010
LQ Newbie
 
Registered: Aug 2010
Posts: 10

Original Poster
Rep: Reputation: 0
yes it worked
thanks sem007!!
 
Old 08-16-2010, 10:23 AM   #4
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,907

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
There is nothing wrong with enabling root password in Ubuntu however keep in mind that all of the official documentation and the support forums assume that you're using 'sudo' instead. So if you are following Ubuntu tutorials you'll need to adjust the commands accordingly.

More info here: https://wiki.ubuntu.com/RootSudo
 
1 members found this post helpful.
Old 08-16-2010, 10:52 AM   #5
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 111Reputation: 111
Quote:
Originally Posted by jaber_6010 View Post
yes it worked
thanks sem007!!
If you are happy with solution please mark thread as "SOLVED" from thread tool

Regards,
 
Old 08-16-2010, 10:57 AM   #6
jaber_6010
LQ Newbie
 
Registered: Aug 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for the tip sem007
I just marked it indeed as solved
 
Old 08-16-2010, 11:10 AM   #7
jaber_6010
LQ Newbie
 
Registered: Aug 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks Snowpine
I found the link very instructive
I initially activated the root account and then after reading through the link and understanding that I can do almost anything with sudo command I disabled again
 
Old 08-16-2010, 03:09 PM   #8
Rambo_Tribble
Member
 
Registered: Aug 2005
Location: N 44 Deg. 56.537' W 123 Deg. 3.683'
Distribution: Kubuntu, MEPIS, SUSE & Debian
Posts: 30

Rep: Reputation: 19
While it is generally frowned upon, a kludge for maintaining a login as root at the console is to use "sudo su" to take on the root identity. You will then be provided with a # prompt in place of the $ prompt. While it can save some typing, just be darn sure to exit from the root login when you finish your tasks.
 
0 members found this post helpful.
Old 08-16-2010, 03:32 PM   #9
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,907

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
Quote:
Originally Posted by Rambo_Tribble View Post
While it is generally frowned upon, a kludge for maintaining a login as root at the console is to use "sudo su" to take on the root identity. You will then be provided with a # prompt in place of the $ prompt. While it can save some typing, just be darn sure to exit from the root login when you finish your tasks.
Please read the link in post #4. 'sudo su' is deprecated in Ubuntu. To quote:

Quote:
None of the methods below are suggested or supported by the designers of Ubuntu.

Please do not suggest this to others unless you personally are available 24/7 to support the user if they have issues as a result of running a shell as root.
 
Old 08-16-2010, 03:32 PM   #10
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 54
Quote:
Originally Posted by Rambo_Tribble View Post
While it is generally frowned upon, a kludge for maintaining a login as root at the console is to use "sudo su" to take on the root identity. You will then be provided with a # prompt in place of the $ prompt. While it can save some typing, just be darn sure to exit from the root login when you finish your tasks.
Just so you know, 'sudo bash' is very similar to 'sudo su' or 'sudo -s' or 'sudo -i': you essentially are running the shell as root. However, this won't work for X.

If you want to enable the root account and run X as root:

Code:
sudo passwd
Then just enter your new root password and you're all set!

BE WARNED, though: When you run anything as root you run the risk of causing damage to ALL your files, not just those within your home directory. And running X as root is no different: if you run Nautilus as root, for instance, and accidentally right-click '/' and click "Delete", you might as well kiss your system goodbye.
 
Old 08-16-2010, 04:33 PM   #11
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,907

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
There is no reason to log into an X session (GUI) as root, ever.

If you would like to run a single application as root in Ubuntu, you may do so with 'gksudo' (or 'gksu' for short works too). For example to launch the file manager as root:

Code:
gksudo nautilus
 
1 members found this post helpful.
Old 08-16-2010, 04:43 PM   #12
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 54
Quote:
Originally Posted by snowpine View Post
There is no reason to log into an X session (GUI) as root, ever.

If you would like to run a single application as root in Ubuntu, you may do so with 'gksudo' (or 'gksu' for short works too). For example to launch the file manager as root:

Code:
gksudo nautilus
Yes - but then you're prompted with a UAC-like window.
 
0 members found this post helpful.
Old 08-16-2010, 04:43 PM   #13
Rambo_Tribble
Member
 
Registered: Aug 2005
Location: N 44 Deg. 56.537' W 123 Deg. 3.683'
Distribution: Kubuntu, MEPIS, SUSE & Debian
Posts: 30

Rep: Reputation: 19
Don't forget the Kubuntu users and kdesudo.
 
1 members found this post helpful.
Old 08-16-2010, 04:50 PM   #14
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,907

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
Quote:
Originally Posted by Kenny_Strawn View Post
Yes - but then you're prompted with a UAC-like window.
Which is bad why?

Anyway, read the link in post #4. The OP did and then marked the thread Solved, so maybe it will answer your questions too.

Quote:
Originally Posted by Rambo_Tribble View Post
Don't forget the Kubuntu users and kdesudo.
I did not "forget" kdesu; it is in fact specifically mentioned in the link in post #4. The purpose of linking to documentation is so we don't have to mention every last detail of a complicated topic every time we make a forum post.

Last edited by snowpine; 08-16-2010 at 04:52 PM.
 
0 members found this post helpful.
Old 08-16-2010, 05:50 PM   #15
Rambo_Tribble
Member
 
Registered: Aug 2005
Location: N 44 Deg. 56.537' W 123 Deg. 3.683'
Distribution: Kubuntu, MEPIS, SUSE & Debian
Posts: 30

Rep: Reputation: 19
If you specifically mention gksudo it is only politic to, in the same breath, mention kdesudo. Manners, you see. But, then I guess that might be too much to ask.
 
1 members found this post helpful.
  


Reply


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
[SOLVED] Window sizing in Lucid Netbook Edition taylorkh Ubuntu 5 06-30-2010 10:09 AM
MSI netbook Wind L1350 SD card reader with Ubuntu Netbook Edition 10.04 Cody Morgan Linux - Laptop and Netbook 0 06-15-2010 06:21 PM
Netbook Edition - how to browse network? carlc1 Ubuntu 1 05-01-2010 10:43 AM
LXer: Kubuntu Netbook Edition Preview LXer Syndicated Linux News 0 11-11-2009 06:20 PM
i can't maximize.. or minimize the virtual windows i have installed in my linux ubunt Revanvar General 3 07-17-2008 11:11 AM


All times are GMT -5. The time now is 03:59 PM.

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