Ben knows what I'm talking about :)

Regarding chroot, I've never actually been clear on one point: if you do e.g. chroot passwd, does it change root first and then fire up the passwd it finds in the changed root filesystem?

Or does it find passwd first, then change root ... and if so, how does it resolve the various libraries, seeing as passwd isn't statically linked and might be built against different library versions in the changed root fs?


On 7/7/20 7:21 PM, Ben Stern wrote:
Two weeks late to the party, I agree with Judah, and do exactly that.
(Well, I usually chroot and run passwd, as opposed to directly editing
important files, which is what I assume Judah means by the "incorrect/bad"
way.)

Ben

On Wed, Jun 24, 2020 at 04:25:26PM -0400, Judah Milgram wrote:
When I need to do this I boot from a live DVD (in my case whatever Slackware
install DVD I can put my hands on first.)

Then mount the "real" root drive on /mnt/hd or something. Then I think the
correct way to do it is with chroot or /usr/bin/passwd -R

Haven't actually tried chroot or passwd -R, but in the future will try that
first. The incorrect/bad way I've been doing it works but could cause
problems.



On 6/24/20 3:57 PM, Moshe M. Katz wrote:
Hi Howard,

I have three possibilities for you:

First, on Ubuntu, it is likely that root has no password at all and all
such access must be done with sudo as the regular user. (At least that's
how every Ubuntu machine I've ever set up has been.) Older versions of
Ubuntu actually did autologin by removing the password (the equivalent of
running `passwd -d`). While "passwordless sudo" is a thing, "sudo by an
account with no password" doesn't work in my testing. If you run `passwd`
as the regular user, does it prompt you for the old password or just let
you enter a new one? If it just prompts you to enter a new password, enter
one and you will then be able to use `sudo`.

The other two only work assuming that the disk is not encrypted.

You can boot into Single User Mode and it is as if you are root. I don't
remember the steps for 14.04 offhand, but this should be helpful: 
https://askubuntu.com/questions/132965/how-do-i-boot-into-single-user-mode-from-grub

You can boot the machine from a Live CD or Live USB, become root there,
and then have root access to the local disk as well.


Moshe

--
Moshe Katz
mmk...@umd.edu <mailto:mmk...@umd.edu>
(301) 867-3732



On Wed, Jun 24, 2020 at 3:25 PM <linux-au...@terrier.ampexguy.com
<mailto:linux-au...@terrier.ampexguy.com>> wrote:

     I assure you that what follows is legit.

     One of my oldest friends died in March (of a massive stroke, not
     corona virus). I inherited his three laptops, one of which is an IBM
     Thinkpad running Ubuntu 14.04LTS. I can produce a copy of his will,
     and, given a day or two to catch up with his executor, a copy of the
     death certificate, if needed.

     It automagically boots "Authorized User" with no password needed. This
     is not the same as root: I opened a terminal window and typed
     "adduser," which you have to be root to do, and got my wrists soundly
     slapped for my efforts.

     So is there a way to determine or at least re-set the root password on
     this machine? I'd like to create another user (i.e., me), and set the
     password for "Authorized User" to something I know.

     If it helps, I'm positive he bought the machine from PC Retro in
     Beltsville a few years ago. Do they use the same root password on all
     their Linux boxes?

     Any suggestions will be most welcome.

     Thanks.

     Howard Sanner

     You received this email because you are subscribed to the UM Linux
     User's Group (UM-LINUX) mailing list. If you would like to
     unsubscribe from this list, simply send an email to
     lists...@listserv.umd.edu <mailto:lists...@listserv.umd.edu> with
     the message signoff UM-LINUX in the body.

You received this email because you are subscribed to the UM Linux User's
Group (UM-LINUX) mailing list. If you would like to unsubscribe from this
list, simply send an email to lists...@listserv.umd.edu with the message
signoff UM-LINUX in the body.


--
Judah Milgram
milg...@cgpp.com
301-257-7069

You received this email because you are subscribed to the UM Linux User's Group 
(UM-LINUX) mailing list. If you would like to unsubscribe from this list, 
simply send an email to lists...@listserv.umd.edu with the message signoff 
UM-LINUX in the body.



--
Judah Milgram
milg...@cgpp.com
301-257-7069

You received this email because you are subscribed to the UM Linux User's Group 
(UM-LINUX) mailing list. If you would like to unsubscribe from this list, 
simply send an email to lists...@listserv.umd.edu with the message signoff 
UM-LINUX in the body.

Reply via email to