Stories
Slash Boxes
Comments

SoylentNews is people

The Fine print: The following are owned by whoever posted them. We are not responsible for them in any way.

Journal by mcgrew

I finally got around to installing Linux Mint (Cinnamon) dual-boot on the Linux box that still has Kubuntu yesterday.

The OS seems every bit as good as Mandrake used to be, I've missed that distro. It's really slow compared to kubuntu, but kubuntu is incredibly limited and hard to use. Plus, it looks clunky compared to Mint, although I really don't care what my tools look like as long as they work well. Kubuntu's don't. I hate Kate, worst text editor I've used. Well, Debug might have been worse...

I installed it after finding while trying it from the CD that connecting it to the network would be a breeze if I had the correct IP. On installation, I wrote the root password down in Notepad on the new Dell notebook and saved it on a thumb drive.

So today I fired it up after typing maybe half a page of the new novel (I hit a wall, must need a break or something, it's about a quarter way done already) and armed with the network drive's IP address, it wanted the drive's password. It has no password, so I left it blank, and it said I had its password wrong.

Well, I thought, I'll see if I can install GIMP and Audacity and tackle the network drive later.

Who says you can't teach an old dog new tricks? I'm 71 next month and I found the installation app, and unlike kubuntu I actually got it to work. It had both programs proudly highlighted, so when I went to install Audacity, the Linux computer's primary app, it of course wanted the root password.

So I got the thumb drive it was stored on, plugged it in, and copied it and pasted it into the password field. I had constructed a jumbled password that almost demanded copy/paste.

Apparently I typed in in to Notepad wrong. So, first, is it possible to retrieve a root password in Mint? If so, how?

If not, I'll reinstall Mint with a password that's impossible to screw up, then change it to something less stupid when I can build a crazy hard password that I can simply paste in.

I'll have to go in the basement after the Unix book to remember how to change the root password. I hate going down there because of the spiderwebs. There's probably a tool in the graphic desktop these days, I'll bet. Maybe I won't have to go down there until I need to change the furnace filter...

Display Options Threshold/Breakthrough Reply to Article Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 4, Informative) by acid andy on Tuesday March 14, @07:23PM (6 children)

    by acid andy (1683) Subscriber Badge on Tuesday March 14, @07:23PM (#1296132) Homepage Journal

    If your non-root user has permission to do sudo (and has a password that you can remember), maybe you can run:

    sudo su

    which should get you a root prompt allowing you to set a new password for the root user. Does that help?

    --
    Master of the science of the art of the science of art.
    • (Score: 2) by JoeMerchant on Tuesday March 14, @07:35PM (5 children)

      by JoeMerchant (3937) on Tuesday March 14, @07:35PM (#1296134)

      sudo su should (might) work to reset the root password, but... at the risk of asking an old dog to consider new tricks: I haven't used root account for over a decade, living in Ubuntu/Debian world (which isn't far removed from Mint) sudo is the only "root" access I have needed since forever.

      --
      Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end
      • (Score: 2) by turgid on Tuesday March 14, @07:42PM

        by turgid (4318) Subscriber Badge on Tuesday March 14, @07:42PM (#1296138) Journal

        I looked in /sbin on Ubuntu the other day and was horrified. What is the world coming to?

      • (Score: 4, Interesting) by RamiK on Tuesday March 14, @07:56PM (3 children)

        by RamiK (1813) on Tuesday March 14, @07:56PM (#1296141)

        He meant you should:
        1. Start the terminal.
        2. Enter "sudo su" where you'll be prompted for the user password you used to login into the machine.
        3. Enter "passwd" where you'll be prompted for a new root password.

        It might work or it might not work. Depends on the distro's default configurations. If it doesn't work and the disk wasn't encrypted, it should be possible to boot the system with a live linux media and reset the root password from there following something like this: http://www.microhowto.info/howto/reset_a_forgotten_root_password_using_a_live_distribution.html [microhowto.info]

        --
        compiling...
        • (Score: 2) by mcgrew on Tuesday March 14, @11:58PM (2 children)

          by mcgrew (701) <publish@mcgrewbooks.com> on Tuesday March 14, @11:58PM (#1296170) Homepage Journal

          Thanks, that was incredibly helpful. I'll look at it tomorrow when I'm all the way sober. None of the drives are compressed or encrypted.

          I'll have to log in to SN from Mint to look at that link, too, so I can reference it as I'm doing it, or maybe from the tablet.

          --
          Carbon, The only element in the known universe to ever gain sentience
          • (Score: 0) by Anonymous Coward on Wednesday March 15, @04:28AM

            by Anonymous Coward on Wednesday March 15, @04:28AM (#1296205)

            Do you know if your root is a simple partition, or is your system using volumes?

          • (Score: 2) by canopic jug on Wednesday March 15, @07:14AM

            by canopic jug (3949) Subscriber Badge on Wednesday March 15, @07:14AM (#1296216) Journal

            If you're going to try that route, just run "sudo -i" instead of "sudo su" and skip a step. Or just cut to the chase and use "sudo passwd", if that is available to you. Otherwise you will have to boot into single-user mode at the console down there among all the spider webs.

            --
            Money is not free speech. Elections should not be auctions.
  • (Score: 4, Informative) by turgid on Tuesday March 14, @07:40PM (2 children)

    by turgid (4318) Subscriber Badge on Tuesday March 14, @07:40PM (#1296137) Journal

    I'm a bit tired at the moment and haven't really read your question properly, but here's a Linux/unix tip. If you forget any password at all, including the root password, if your disk isn't encrypted, and this applies to the hard disk of your system, you don't need any passwords at all. You just need to boot off a different device, for example a USB stick or a DVD, and then manually mount your volumes/partitions.

    For example, suppose your root partition is on something like /dev/sda2 (second partition of the first SATA disk) you could boot off a USB stick using a live distro or an install image. That would probably come up as /dev/sda instead. The PeeCee BIOS/UEFI would map it as the first drive. Your root drive would then become perhaps the second (/dev/sdb). So you would need to get yourself a command prompt somehow (trivial with the Slackware installer) which will be root on an installer (or do a sudo su on something else) and then you can mount your disk.

    Remember that your proper root disk is now e.g. /dev/sdb so your root partition will now be /dev/sdb2. You can make a nice mount point for it:

    mkdir -p /mnt/rootdisk

    Then mount it:

    mount /dev/sdb2 /mnt/rootdisk

    At that point you have unfettered access to everything. You can even edit /etc/passwd and /etc/shadow and delete users and passwords.

    This is why encrypted disks are a thing. Otherwise the machine's completely insecure.

    • (Score: 1, Insightful) by Anonymous Coward on Wednesday March 15, @04:34AM (1 child)

      by Anonymous Coward on Wednesday March 15, @04:34AM (#1296206)

      Thank you, I started to write this up too, but realized he might have volumes, which take a few additional steps to mount (vgscan, vgchange, lvs, ...)

      https://www.cyberciti.biz/faq/linux-mount-an-lvm-volume-partition-command/ [cyberciti.biz]

      Also, just delete the garbage (password hash) between the first and second colon in the "root:" line in /etc/shadow

      Not sure what editors he might have available on the bootable "live" media, and not sure if he's good with vi (I try to avoid it at all costs...)

      I've had to do that many times- mostly to rescue someone's system or a user's login.

      • (Score: 1, Insightful) by Anonymous Coward on Wednesday March 15, @06:06AM

        by Anonymous Coward on Wednesday March 15, @06:06AM (#1296211)

        That is why I linked to the Arch Wiki. Most of the methods there rely on the host system itself to fix the problem. That avoids the trouble with even having to figure out the layout to get the file to the point where it can be edited.

  • (Score: 1, Informative) by Anonymous Coward on Tuesday March 14, @11:58PM

    by Anonymous Coward on Tuesday March 14, @11:58PM (#1296171)

    Here are five techniques from the Arch Wiki: https://wiki.archlinux.org/title/Reset_lost_root_password [archlinux.org]

  • (Score: 2) by Subsentient on Thursday March 16, @04:41AM

    by Subsentient (1111) on Thursday March 16, @04:41AM (#1296402) Homepage Journal

    /bin/mount -o remount,rw,sync,noatime /dev/YourRootPartition /

    then either
    /bin/passwd root

    or change the root:x: in /etc/passwd to root::

    sync (Yes, still sync. Waiting for it to complete is useful to ensure that the disk isn't busy, because sometimes poweroff -f has broken sync-before-poweroff.)
    poweroff -f

    --
    "It is no measure of health to be well adjusted to a profoundly sick society." -Jiddu Krishnamurti
(1)