Hey guys. I’m new to Linux and I’m running Linux Mint 21.2 Cinnamon. Yesterday I have f*cked up. I was testing things in users and geve myself standart priveledges insted of Admin ones I had from beggining and then restarted PC. I then tried log back into users tab and change myself back to Admin but even tho the password is correct It says that it is not. /So at this point there is only one user in PC who has standart privliedges and no Admin./ I then tried to access root via terminal and this time It said that I don’t have permision to do that. And this is where I’m at right now. Please help get back my admin privliedges.

Edit: Issue is fixed. I started GRUB and changed my password which fixed the whole issue. Once again big Thank you to everyone who gave me tips and also big thank you to the guy who started posting about rowing machines. You all wonderful.

  • Nibodhika@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    edit-2
    1 year ago

    Someone has already given you a guide on how to change the password via grub params, however that might not be necessary. It’s important that when you ask these questions you provide the exact command you’re using and the exact things you changed, what I assume happened is that you removed yourself from the wheel group (which in Mint might be listed as Admin privileges), this is important because the sudo command (unless you’ve customised it) only works for members of the wheel group. Then you said you tried to access the root via terminal and it told you you didn’t have permissions, I’m 99% sure that you tried something with sudo here, which will no longer work because your user is not an admin anymore.

    So are you screwed? Nope, you can access the root user without the need for sudo. Most people when they want to have a root shell use sudo su, in that command su is the actual part that lets you login as root (in fact su is short for Switch Substitute User, and you can switch to any user using it. Fun fact sudo is a short for Switch Substitute User and DO, so that you can run things as root without needing to login as root). As you might have already guessed just running su and putting the root password should work. Then why do people use sudo su? Because sudo su will ask you for YOUR password, whereas su asks you for the ROOT password (which in most servers is different, but most home computers is the same). You set the two of them when installing the system (in fact it’s very likely that you ticked a checkbox that said something like “use the same password for the root account”).

    Edit: The correct therm used in the su manual is Substitute not switch as someone mentioned in a reply.

    • Ghoelian@feddit.nl
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      Huh, I always thought su stands for super user, but apparently it actually stands for substitute user (according to the manpage)

      • SpaceCadet@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        16
        ·
        1 year ago

        I don’t think “substitute user” is the original meaning, and it’s more like a retroactively applied acronym.

        Looking at various old Unix manpages, it said various things in the past. In the HP-UX documentation it even lists three different variants in the same man page: “switch user”, “set user” and “superuser”.

        “superuser” is probably the original meaning, because that’s what it says in the Unix Manual 1st edition (1971): http://man.cat-v.org/unix-1st/1/su

        NAME	su -- become privileged user
        SYNOPSIS	su password
        DESCRIPTION	su allows one to become the super--user, who has all sortsof marvelous powers. In order for su to do its magic, the user must pass as an argument a password. If the passwordis correct, su will execute the shell with the UID set to that of the super--user. To restore normal UID privileges,type an end--of--file to the super--user shell
        

        I love Unix archeology :)

      • ardorhb@kbin.cafe
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        You can do su to change the user in the current shell. Afaik it just defaults to root if no user ist specified. Everytime you run su you actually do su root

        That said I always thought that it stands for switch user so intereresting to know that it‘s substitute.

      • r00ty@kbin.life
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I’ve heard people call it superuser since before Linux (AIX Unix a long time ago for example).

        But substitute user makes sense since you can su to any user (just root is the default).

    • Bene7rddso@feddit.de
      link
      fedilink
      arrow-up
      6
      ·
      1 year ago

      Usually the root password isn’t set at all, and the only way to use rootprivileges is sudo. But OP isn’t screwed, they can use a Live CD and chroot