LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-08-2011, 10:13 PM   #1
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Rep: Reputation: 30
Passord and user questions?


Just installed Xubuntu and when I log in as the user I created, It uses the same password as the root password. I am confused, why would the user have the same password as root? also.... When I try to login as root either in the GUI or from command line I cannot.

Any ideas why this is?

Ive never used ubuntu before.
 
Old 03-08-2011, 10:24 PM   #2
comp_brad1136
Member
 
Registered: Nov 2004
Location: SW Missouri, USA
Distribution: Debian 6 "Squeeze"
Posts: 55

Rep: Reputation: 7
ok, now that's WIERD!!!

take a look in /etc/passwd

it's format is:

username : password : UID : GID : blah blah blah

root should be UID and GID 0.
your username should be something higher, say over 100 or over 1000
 
Old 03-08-2011, 10:30 PM   #3
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
This is the user line:
joey:x:1000:1000:joey,,,:/home/joey:/bin/bash

I dont dont see a uid or gid anywhere in /etc/passwd
 
Old 03-09-2011, 04:12 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
The root password is disabled in all the ubuntu variants.

See here for one of many explanations on the www.
 
Old 03-09-2011, 06:19 AM   #5
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,969

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
Quote:
Originally Posted by M$ISBS View Post
Just installed Xubuntu and when I log in as the user I created, It uses the same password as the root password. I am confused, also.... When I try to login as root either in the GUI or from command line I cannot.

Any ideas why this is?
The user you created does not have the same password as root. In Xubuntu, root has no password. This in effect disables logging in to root. This is why you cannot log in to root.

In that line you posted from /etc/passwd, that x in the second field indicates the password is stored in /etc/shadow. If you look at shadow (root access needed) you will see the encrypted password in the second field. If you look at root, you will see a "!" in that field.

In *ubuntu flavors, root login is disabled by default. It easy to fix, add a password to root.

As for the question why would the user have the same password as root? Why not? I do this on all my personal systems. I am the only one who accesses them.
 
Old 03-09-2011, 06:28 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
On many distro's, including Ubuntu and Fedora, the sudoers file is configured so that a person in a particular user group is allowed to sudo to root. It it configured so that you use your own password, to prove you are that person.

The advantage to this is that you can assign someone to the group who needs to run a root command, without giving that person the root password. So here the advantage is when there are several people administering the computer. Also, sudo commands are logged telling you who executed a command if you have a question later.
 
Old 03-09-2011, 06:57 AM   #7
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
Oh, so in Ubuntu you cannot log into Root under a GUI as if its a separate user like in slackware?
 
Old 03-09-2011, 06:59 AM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Oh, so in Ubuntu you cannot log into Root under a GUI as if its a separate user like in slackware?
You never login under the GUI as root.

Kind regards
 
Old 03-09-2011, 07:00 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by M$ISBS View Post
Oh, so in Ubuntu you cannot log into Root under a GUI as if its a separate user like in slackware?
Well it's possible, but you need to cheat your way in, and go against their administrative model which generally works very well. You should never need to run X as root, absolutely never.
 
Old 03-09-2011, 01:51 PM   #10
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by acid_kewpie View Post
Well it's possible, but you need to cheat your way in, and go against their administrative model which generally works very well. You should never need to run X as root, absolutely never.
I always run X as root (In slackware) because alot of times what I am trying to do (like mount a drive or copy files) as a user I cannot, because of permssions problems.
I guess in Ubuntu I wont be able to login as root under X.
 
Old 03-09-2011, 01:53 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by M$ISBS View Post
I always run X as root (In slackware) because alot of times what I am trying to do (like mount a drive or copy files) as a user I cannot, because of permssions problems.
I guess in Ubuntu I wont be able to login as root under X.
You're doing it wrong. That's what sudo is for. Again, there's no need to run X as root.
 
Old 03-09-2011, 08:01 PM   #12
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
Back to my original problem....

When I first startup Ubuntu I enter my password and I log in, but when I need to do something that requires root priveledges I enter the same password and am given access.

Something doesnt seem right with this?
 
Old 03-10-2011, 01:39 AM   #13
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Take a look at
http://en.wikipedia.org/wiki/Sudo

Kind regards
 
Old 03-10-2011, 03:34 AM   #14
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Again, using "TargetPW" in the sudoers file wouldn't make sense in Ubuntu since the target (root) has no password.

One may wish a certain group of users to only perform certain root commands. Letting them know the root password would allow them to do anything.

For mounting external drives, look at the "users" mount option in your fstab file. It allows mounting an unmounting those filesystems as a normal user.

Also look at installing the ivman package. Then you could use the `halmount' command to mount, unmount & eject removable drives. If your system uses policykit, look at adding the policy allowing the desktop session user mounting removable drives.
 
Old 03-10-2011, 03:52 AM   #15
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
The "sudo" is configurable and quite flexible. There is no possibility to make default configuration applicable for everyone. Administrator of computer need to adjust configuration for their needs if default does not match. The default for Ubuntu is good for home usage. If you want to give for administration root or other user password read "man sudoers".
 
  


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
Some Questions from a new user :) eAbdul Mandriva 8 11-04-2007 04:21 AM
New user questions... Panagiotis_IOA Slackware 5 02-03-2006 02:37 PM
New user many questions madscient Linux - Software 4 08-07-2005 07:47 PM
change of passord propagated slowly josefiller Linux - Networking 2 08-05-2004 11:42 AM
some new user questions... scotty2hott2k Fedora 5 02-16-2004 07:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:31 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