LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-20-2012, 12:31 AM   #16
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705

Hi,

Quote:
Originally Posted by kedarp View Post
I did it from the recovery mode. Could change the permissions of the sudoers file as root.
But isn't it unsecure to get the access to root account from the recovery mode without a password?
But Thanks all for the help.
If someone has physical access to the machine, then all bets are off.

Evo2.
 
Old 08-20-2012, 07:32 AM   #17
byannoni
Member
 
Registered: Aug 2012
Location: /home/byannoni
Distribution: Arch
Posts: 128

Rep: Reputation: 36
Quote:
Originally Posted by kedarp View Post
I did it from the recovery mode. Could change the permissions of the sudoers file as root.
But isn't it unsecure to get the access to root account from the recovery mode without a password?
But Thanks all for the help.
If you want, you can make a root password with this:
Code:
sudo passwd root
 
1 members found this post helpful.
Old 08-20-2012, 11:58 AM   #18
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Quote:
Originally Posted by kedarp View Post
I did it from the recovery mode. Could change the permissions of the sudoers file as root.
But isn't it unsecure to get the access to root account from the recovery mode without a password?
But Thanks all for the help.
There's an even worst downfall to this: It allows you to issue the startx command as root.

I'm now thinking Evo2 is the same person who responded to this post:
http://ubuntuforums.org/showthread.php?t=1842624

I still think it's insecure and I absolutely hate the idea of dropping to recovery ode without being ask for root's password.
 
Old 08-20-2012, 08:52 PM   #19
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Like Evo2 said
Quote:
If someone has physical access to the machine, then all bets are off.
unless you've encrypted your files and stored the key elsewhere.

Remember that in the real world, there has to be a way to recover a borked system WITHOUT re-installing if at all possible.
You can add paswds to BIOS and GRUB, but if someone has physical access they can remove the disk and add it to another machine and mount it without running it; same as using 'linux rescue' mode if booted from the Install Media.
 
1 members found this post helpful.
Old 08-20-2012, 08:58 PM   #20
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by towheedm View Post
I'm now thinking Evo2 is the same person who responded to this post:
http://ubuntuforums.org/showthread.php?t=1842624
Was not me. I've never posted there.
Quote:
I still think it's insecure and I absolutely hate the idea of dropping to recovery ode without being ask for root's password.
So even if you can't get a root shell by booting this way, what is to stop a person with physical access booting from some removable media and then mounting the file system?

If you really are worried you should set a password for the bios (should be easy), and encrypt your filesystem (significant effort), and keep your machine in a physically secure location.

Evo2.
 
Old 08-21-2012, 03:03 AM   #21
kedarp
Member
 
Registered: Jul 2012
Distribution: Ubuntu
Posts: 198

Original Poster
Blog Entries: 3

Rep: Reputation: 23
Quote:
Originally Posted by byannoni View Post
If you want, you can make a root password with this:
Code:
sudo passwd root
The root account was there, and you can always su to root.
What I did in post #8, I tried to use the users sudo password with su.
So I got the "Authentication Failure" message. In Ubuntu,
the root password was never set and there was no password for root. So
it does not ask for root password in the recovery mode also.
Note the system asked for password in recovery mode when I set one.

What ubuntu users don't know, that the root account always exists without
a password. So it is better that they know about the root and set a password.

The thread is interesting.

Last edited by kedarp; 08-21-2012 at 03:13 AM.
 
Old 08-21-2012, 06:44 AM   #22
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by kedarp View Post
What ubuntu users don't know, that the root account always exists without
a password.
That is not quite true. In Ubuntu the root account is set to a password hash that doesn't match a password. So if you don't set up a password yourself you can't login as root or su to root. That is also the reason why the system doesn't ask for a password in recovery mode, you weren't be able to answer that question anyways. From https://help.ubuntu.com/community/RootSudo:
Quote:
By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user.
Quote:
The sulogin program in Ubuntu is patched to handle the default case of a locked root password.
 
1 members found this post helpful.
Old 08-21-2012, 10:27 PM   #23
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

Rep: Reputation: 20
I would use another distro's live CD if I were you
 
  


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
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM
Problem with SUDO : sudo: pam_authenticate: Module is unknown cristoph_ Linux - Software 2 03-02-2009 07:12 PM
Slackware 12.0: boot problem & sudo / wifi-radar problem War_Ensemble Slackware 7 01-15-2008 09:49 AM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM

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

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