LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-22-2007, 02:28 PM   #1
iconicmoronic
LQ Newbie
 
Registered: Mar 2007
Posts: 21

Rep: Reputation: 15
Lightbulb Root login issues with Mandriva & Ubuntu


This is embarassing. I'm a new Linux student, and my system seems to have locked me out. I went out and purchased an AMD64 HP computer, so the version of Linux that my class is using to study is not possible to install on this computer, thus I tried various versions of Linux before resolving to Mandriva. Ubuntu was great, except there was no root login by default a person told me and this was the reason that I have having issues logging in as root on my computer. Now the issue is continuing and this is after multiple reinstallations of the Linux platform, Mandriva will not allow me to login as root at the intial login prompt. Furthermore, the administrator login that I created when I installed will also not login and using my password with either of these accounts is not working. I hoped for the best and attempted to make some root decisions from a $ terminal, but as I already knew that wouldn't and didn't work.
I'm kidn of at a loss. A simple explanation would be most appreciated, because I'm now beginning to wonder if this is not an invasion by someoen more computer inclined than myself, and yes I have my suspicions.

So, to recap, the issue is that I cannot login as root on the computer. Mandriva requested I provide an administrative login or administrative e-mail upon installation, as well as a root password. This password does not work with the root login name, or the name of the administrative login that I provided during installation.

Could it be because my security setting is set to higher?
I have no problems surfing the internet, but perhaps this has created an internal security paramete to which I am unaware.

Thanks,
Andres

NOTE: Issue not resolved but I found a good referance on the simialr threads below.

Last edited by iconicmoronic; 03-22-2007 at 02:32 PM.
 
Old 03-22-2007, 02:39 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Usually graphical root login is (or should be) prevented. Point? Root user shouldn't need graphical tools, running X session as root is just not something you are supposed to do. So with Mandriva, try to press CTRL+ALT+F1 (or trough F6) to get into a console and see if you can login as root there (note: on console nothing is printed on screen when typing a password; root user's name is root with non-capital letters).

On Ubuntu it's the same except, like you said yourself, root account is locked/frozen initially. This is because of security; on Ubuntu sudo is configured for the first user created during setup, so that the user you create when installing Ubuntu can use sudo (which asks for that user's password) to run commands as root. Users created afterwards don't have sudo access unless given permissions. Usage:
Code:
sudo somecommand
after which you're asked for the user's password. To unlock root account, you could simply
Code:
sudo passwd root
to change the root's password to some known value, after which I think it should work (an account can be locked for example by adding some letter to the user's password field in /etc/shadow that includes a character that's not supposed to be there, like !)

You can configure your system (or rather login manager, like GDM or KDM) so that root login is allowed, but I discourage doing so. If you are ok with the fact that it might open some security holes, go ahead, but if you're interested in maximizing security, that's one step

EDIT: because some users find using sudo instead of a root login irritating, I'd like to ask to think about it twice. sudo is a way to run commands with root privileges but without logging in as root; users who are granted access to it don't need to know the root password, and it can be configured so that only certain users can use it (at all), and those users who can use it can only run certain commands (For example) with it, while others are not permitted to be run (therefore a user can use sudo to run mount if it's needed, but so that the same user can't change root password using passwd or any editor to clear the password field from the shadow file). It can be configured to let the users run some commands as root without a password being asked (though I dislike that), to make the system usage more flexible if there are no other means. Using sudo means that a user has to be, usually, in the sudo group and that /etc/sudoers is configured to let them use some command(s) with sudo (file should only be accessible to root; other users than the admin user shouldn't have full sudo access, because if they had, they could alter the file and have unlimited root access). Some users use su to switch their terminal login to another user, for example to become root, but I prefer sudo over su in that case because using su means you'll have to type root password (to become root) so that can't obviously be given for every user, and because it's a login (whereas sudo runs a command, and when it exits, the user doesn't have root permissions anymore -- unless configured so that sudo "remembers" the user for some time), it means that when a executed program ends, the login is in a usual case left open which isn't a good thing.

Some (usually new) users learn to use only root account all the time, mainly because they've used to that in Windows and because "things work more easily and I don't have to type root password every now and then". That's a bad way, as those people should have already learned from Windows (running as root and doing something foolish may make the system wulnerable to straight attacks, in addition to a lot of other things). For security it's better to stick using regular user accounts, and configure things once so that regular users don't have to use root permissions. Some things just need root permissions and can't be configured (for a reason or another) to run under non-root permissions, and in that case things like sudo come in handy. Actually these days using root account is not vital except in some rare situations, so I understand completely the Ubuntu way of locking it -- new users don't often even miss it before somebody tells them they need to have a root login. And the best thing is, when it's needed, it can be opened. Having it locked means simply that it's more difficult to use by the bad folks too

As a final (side?)note, opening a root account even after you've "lost/forgotten" the password isn't that difficult. It becomes difficult only after you or somebody else has hardened the system enough, and that means quite a lot of work; most of the regularly installed Linux systems can be easily "hacked" (it's not even hacking, really) with a single reboot (so..remember to set a bootloader password to protect configuring boot parameters!) And after you've done everything to make the box safe you find out somebody just stole your harddisk which wasn't completely well enough encrypted. Oh, well..

Last edited by b0uncer; 03-22-2007 at 02:55 PM.
 
Old 03-22-2007, 02:41 PM   #3
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
To use root with Ubuntu you type sudo press enter. For Mandriva in console type su press enter.
 
Old 03-22-2007, 04:07 PM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by {BBI}Nexus{BBI}
To use root with Ubuntu you type sudo press enter.
actually it's:
Code:
sudo -i
@ iconicmoronic: as has already been expressed, logging-into your desktop as root is one of the most common and dangerous mistakes linux newcomers make... it's highly recommended that you try and get rid of that bad habit... i would also encourage you to give ubuntu another shot, cuz the sudo thing (although weird at first), and the fact it doesn't let you log-in as root, is actually a really sane security policy...

Last edited by win32sux; 03-22-2007 at 04:11 PM.
 
Old 03-23-2007, 02:51 AM   #5
iconicmoronic
LQ Newbie
 
Registered: Mar 2007
Posts: 21

Original Poster
Rep: Reputation: 15
...

actually the scope of the issue was a little greater. In Mandriva I used allowrootlogin=true, and although it set the mode to true root login was still prevented. Ubuntu would allow usage of sudo yet whenever I would change permissions, (as with Mandriva), I continually got the message operation not permitted. After two days I got aggravated, especially once I had set the root login to true so I reverted to Windows and will reinstall Linux once I'm sure that I can login as root. I really only need root permissions in order to create directories, and have access to them for installing files. Ubuntu would allow the creation of the directory, but placed it on the desktop where once I attempted to extract from archives into the directory, the directory would not appear. Any writing and even viewing of /etc, /bin, and some otehr directories was entirely prevented, the same (latter complaint) was the same for Mandriva.

So I will try your suggestions, and then decide where to go from there, unless of course you have a greater suggestion for this specific problem (in case your current posts are unsuccessful).

Regards,
Andres
 
  


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
Root Login into X in Mandriva 2007 babybu11 Mandriva 36 05-27-2007 09:51 AM
Root login problem on 2007 mandriva svolpe Linux - General 2 03-07-2007 04:11 AM
login and reboot issues with Mandriva 2006 wheel Mandriva 8 09-18-2006 07:31 AM
Mandriva Graphical Login Issues neyoung Mandriva 3 11-09-2005 03:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:13 AM.

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