LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 10-12-2009, 10:20 AM   #16
nportela
LQ Newbie
 
Registered: May 2006
Posts: 10

Rep: Reputation: 0

Hi,

I passed here because i was having a similar problem and resolve the problem of login with root the folloing way:

In grafic environment press "System" -> "Administration" -> "Login Window"

Put your password

In "Security" Tab select the option "Allow local system administrator login"

Restart the system and login with root.

Hope this help

Best regards
 
Old 10-12-2009, 03:28 PM   #17
vigdavies
LQ Newbie
 
Registered: Oct 2007
Location: Calgary, Alberta, Canada
Distribution: Ubuntu 9.04
Posts: 29

Original Poster
Rep: Reputation: 15
Question, about the sudo password

Thanks so much for all your replies and wanting to help me.

Let's suppose my sudo password is John
Would that be the root password also if I had used that when I created it upon installation of Ubuntu ?
We'll John is my password when I login to my computer once I boot it from start and enter in my username.
Would the su password be the same as the sudo password ? 'Cause it's not.
Then, what would it be ?

Rgds,

Vince
 
Old 10-12-2009, 04:24 PM   #18
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
It doesn't really matter what the root password is, however I think ubuntu creates a root user without a usable password so the command "sudo passwd root" with the sudo account will allow you to change that password (remember that sudo asks for the user's password, not root's that would be su), however there are so many alternative ways to by pass it elsewise... for example "sudo /bin/bash" in terminal will create a bash session as root or on boot, edit the grub boot configuration, go to the kernel line and append "init=/bin/bash" will give you a single uesr mode like status where you can effectively change everything anyway... I know this, had to fix Ubuntu servers in the past... my experience says don't use Ubuntu for a server, heh.

Last edited by r3sistance; 10-12-2009 at 04:26 PM.
 
Old 10-12-2009, 04:45 PM   #19
linux@cpu-computers.com
LQ Newbie
 
Registered: Oct 2009
Location: Ontario Canada
Distribution: Kubuntu 9.04 Desktop
Posts: 14

Rep: Reputation: 0
Its a good habit to get into using 'SUDO'. When I first started using linux I always wanted to use root. Then distros stopped allowing it by default.. Many questions are asked in these forums regarding root! Get used to SUDO its much safer and there isn't a thing you can't do without it.

Besides, you're less likely to screw things up!
 
Old 10-12-2009, 05:54 PM   #20
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Basically, all *nix (except Ubuntu ...sigh...) ask you to provide a root passwd at installation. This is (also) the passwd to use for the 'su -' cmd.
Ubuntu decided to be different and basically disable the root acct. Instead they automatically give the first created non-root acct full access by creating an

su -

entry in sudoers file, so that

sudo su -

gives you full root access. Note that the sudo cmd takes the current user's passwd, not root's.

The root acct is still there, as *nix won't run without it.

In the traditional approach, a non-root user would have to know both his own acct passwd to login and root passwd to become root via 'su -'.
Under Ubuntu, he only needs to know his own.....

Note also that sudo wasn't originally designed to give any sudo user full root access. It was designed so that root could give access to specific cmds (on specific boxes) to specific users ie junior admins.

The syntax is

user machine=(runs_as) /full/path/to/cmd

optionally you can insert NOPASSWD just before the cmd. The run-as spec is also optional.
http://linux.die.net/man/5/sudoers

Last edited by chrism01; 10-12-2009 at 06:17 PM.
 
Old 10-12-2009, 06:14 PM   #21
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by linux@cpu-computers.com View Post
Its a good habit to get into using 'SUDO'.
I'm not looking for a fight here, but it's probably a bad idea to capitalize the names of Linux commands in responses, unless the actual Linux command contains caps. "sudo" is not "SUDO", in fact, "SUDO" it not a command at all. It's probably obvious to anyone who's used Linux for years, but not so obvious to the newbie.
 
Old 10-12-2009, 06:21 PM   #22
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 56
Quote:
Originally Posted by linux@cpu-computers.com View Post
...Then distros stopped allowing it[root] by default..
Only Ubuntu, as far as I am aware.

Quote:
... Get used to SUDO its much safer and there isn't a thing you can't do without it.

Besides, you're less likely to screw things up!
How, exactly, is a fully root-enabled user account going to prevent mistakes? "su -c <command>, <password>", "sudo <command>, <password>", "su, <password>, <command>"...if you don't know what you're doing, you might make a critical error(for that matter, you might mess up even if you know what you're doing)..."sudo" won't protect you from a lack of knowledge. Its intent is to give a user *limited* root access=>

Quote:
Originally Posted by chrism01 View Post
Note also that sudo wasn't originally designed to give any sudo user full root access. It was designed so that root could give access to specific cmds (on specific boxes) to specific users ie junior admins.
And is, in fact *less* secure

Quote:
Originally Posted by chrism01 View Post
...Note that the sudo cmd takes the current user's passwd, not root's.
than requiring the actual root password... if you can't/aren't authorised to login as root, you shouldn't get to be root via a misused command + a non-root-user's password.

Last edited by mudangel; 10-12-2009 at 06:23 PM.
 
Old 10-13-2009, 05:37 AM   #23
MoonMind
Member
 
Registered: May 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 448

Rep: Reputation: 38
Quote:
Originally Posted by mudangel View Post
How, exactly, is a fully root-enabled user account going to prevent mistakes?
You're reminded that you do something that's critical any time you try. If you're root, you're just free to go. OTOH, as you describe, using su is a healthy way. I use both Debian and Ubuntu, and Debian's dialogue to require root privileges isn't much different from Ubuntu's dialogue asking for your password.

I don't think root access is a bad thing, but it's pretty hard to root a Ubuntu box without knowing the username of the main user... There's no root you could brute-force.

Quote:
And is, in fact *less* secure
Only if the password of the main user is discovered - remember, you're not root if you have to use sudo. The only thing one could discuss is the setting to store the password for the running session... Bottomline: Never leave your terminal unattended, log out if absent or use screen lock.

Quote:
than requiring the actual root password... if you can't/aren't authorised to login as root, you shouldn't get to be root via a misused command + a non-root-user's password.
Why? What if the root password is discovered? I think it's *all* in the password - handling systems of either design is too similar to offer a real distinction. Use secure passwords, don't write them down, ever. Know your system's potential weaknesses and don't forget to prevent misuse by securing your system while you're not working at it.

M.
 
Old 10-13-2009, 08:00 AM   #24
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by MoonMind View Post
You're reminded that you do something that's critical any time you try. If you're root, you're just free to go. OTOH, as you describe, using su is a healthy way. I use both Debian and Ubuntu, and Debian's dialogue to require root privileges isn't much different from Ubuntu's dialogue asking for your password.

I don't think root access is a bad thing, but it's pretty hard to root a Ubuntu box without knowing the username of the main user... There's no root you could brute-force.
If we are on about an attack over the internet and we are talking about a server, you'd be surprised how unsecure alot of servers actually are. More so how unsecure the administrators of alot of servers are, I work in a datacenter so I get to see ALOT of compromised boxes, I think the only OS I have ever dealt with that I am yet to see compromised is Mac OS but I think that's more due to usage (or there lack of) then anything else.

All disabling root does, it blocks the basic bots/scripts from brute forcing/dictionary attacking (against root), but if you got even half a decent set-up anyway they won't do anything (strong password, password attempt limits). It's the pros, the real crackers you gotta worry about and if you think disabling root really sets them back, then I would say it's a false belief. Anyways as far as it goes, most people when asked to make an account name for a server will end out choosing something simple like admin anyways (and yes, the brute forces try account names like admin and administrator as well)... so protection against brute-force isn't there when you consider user-apathy to security... unfortantly that same apathy does allow the basic bots/scripts to actually strike against root accounts of some servers with stupidly easy passwords. Tho I have to say alot more usernames and passwords in my opinion get figured out from FTP...

But if we are on about a normal set-up, without a protected /var then your potentially open to thinks like root kits anyways, protecting /var with nosuid, noexec and nodev are extremely important on a server, potentially important on a desktop too, if you have the wrong services running or ports open.

If we get into physical security then Ubuntu has none...

Quote:
Originally Posted by r3sistance View Post
on boot, edit the grub boot configuration, go to the kernel line and append "init=/bin/bash" will give you a single uesr mode like status where you can effectively change everything anyway...
If grub is passworded, reinstal grub... it's all too easy really. Once in the command line just "sudo passwd root" and it's all swinging fine again. or edit the sudoer's file.

Last edited by r3sistance; 10-13-2009 at 08:05 AM.
 
Old 10-14-2009, 03:02 PM   #25
vigdavies
LQ Newbie
 
Registered: Oct 2007
Location: Calgary, Alberta, Canada
Distribution: Ubuntu 9.04
Posts: 29

Original Poster
Rep: Reputation: 15
Still going through a learning curve with this sudo thing

Ok..thank you all for responding. I appreciate this community, and your comments with suggestions and explanations.

Let me tell you this, the only password that I've had to create initially after the Ubuntu 9.04 install is the same one I am asked when using the sudo command when installing or editing a configuration file. I'm always signing in with my name and this password. The system logs me in, I install software embedded in Linux, get asked my sudo password, and a way be go. Sometimes stuff doesn't load up, and that's another story. Nevertheless, I suppose that what I am doing in regards to knowing what the sudo password or su password is the password that I log on with, right ? By the way, I am the administrator for my computer.
 
Old 10-14-2009, 06:20 PM   #26
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
It's all explained above. Ubuntu do it the non-std way. The first user you create during install is a non-root user and Ubuntu automatically enables that user in sudo to have complete access, IOW, be an admin equiv to root, via the sudo tool.

For sudo (unless the NOPASSWD option is set), your login passwd IS your sudo passwd; that's how the system knows its you.

For a normal *nix system, the root user is also enabled at install, along with his own separate passwd.
To become full root from a normal user, you type

su -

and give the root(!) passwd. su and sudo are not the same(!).

You should re-read the answers above and also the man pages
http://linux.die.net/man/1/su
http://linux.die.net/man/8/sudo
http://linux.die.net/man/5/sudoers

Unix was originally designed as a multi-user server system, not a single user desktop, which is where MS started.

HTH
 
Old 10-15-2009, 06:03 PM   #27
linux@cpu-computers.com
LQ Newbie
 
Registered: Oct 2009
Location: Ontario Canada
Distribution: Kubuntu 9.04 Desktop
Posts: 14

Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post

Unix was originally designed as a multi-user server system, not a single user desktop, which is where MS started.

HTH
One point for Unix! .. nice
 
Old 10-16-2009, 02:26 PM   #28
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by linux@cpu-computers.com View Post
One point for Unix! .. nice
Not really, Unix was designed to be on a main frame type of system running dumb terminals underneath, it proceeds Microsoft by many years. However an OS designed for a mainframe system was not really suitable for the starting to develop home-systems or single/solo terminals and IBM hired MS to make an OS for the new market (called PC-DOS). However as it went on and the clear success of PC-DOS, MS said they deserved to be paid more for their work. IBM didn't agree and MS went off and made a new DOS (or atleast this is their claim...) called MS-DOS that would work on competitor's hardware(referred to as PC compatible).

Unix didn't really catch on to the home market... MS helped bring along personal computers for the home... they also brought about the whole idea of closed source productions/software (open source essentially predates closed source). In honesty, there is benefits to both closed and open source to say one is better then the other in a generalised statement doesn't take into account that different situtations warrent different solutions.

Anyways, I was just pointing out this isn't really score one for unix, it's just different markets for different OSs, as the more intelligent terminals starting coming out, mainframes with dumb terminals started becoming less popular.

Last edited by r3sistance; 10-16-2009 at 02:27 PM.
 
Old 10-17-2009, 07:53 PM   #29
vigdavies
LQ Newbie
 
Registered: Oct 2007
Location: Calgary, Alberta, Canada
Distribution: Ubuntu 9.04
Posts: 29

Original Poster
Rep: Reputation: 15
Root access secured now because of your help :D

Thanks for the help in getting access to root finally. What a work !!!
Bless your heart !!!
 
  


Reply



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
Password Recovery in Edubuntu 7.04 - In Terminal, Root Login : su , password : ????? farhannaeem13 Linux - Security 3 11-30-2007 09:59 AM
How to set login and password and root password in suse 10.2 sirius57 SUSE / openSUSE 8 07-24-2007 09:51 AM
root login password barrythai Ubuntu 1 12-25-2006 12:26 PM
Redhat 9 root login password jmzcons Linux - Software 1 02-27-2005 04:30 PM
ROOT LOGIN OK, su password NOT OK Darrell_Thomas_ Linux - Security 3 10-19-2004 02:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:18 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration