BECOME ROOT! ish... (Linux+ Objective 2.4.2)

Поділитися
Вставка
  • Опубліковано 29 вер 2024

КОМЕНТАРІ • 15

  • @marklalonde8194
    @marklalonde8194 Рік тому +2

    those videos are gold !! Thank you for keeping updating the series you really help

  • @Jeffsa12
    @Jeffsa12 Рік тому +2

    Informative vid Shawn!
    An FYI: On a Linux distro that does not or minimally makes or changes configs, ie: Arch, visudo uses vi as editor out of the box. You can either setup VISUAL editor variable for root, or what I've got into the habit of doing is calling the EDITOR var on the cli: EDITOR=nano visudo.
    I've got into the habit of using pkexec for GUI stuff, and still use sudo on the cli. Also, pkexec is strange in some unexpected ways. ie: changes $PATH

    • @shawnp0wers
      @shawnp0wers  Рік тому

      I appreciate that, and mostly it just makes me chuckle when the default editor is nano when I launch visudo. But you are correct, for sure.
      pkexec is indeed odd, but again you're right it seems to do well with GUI programs. :)

  • @itrilode
    @itrilode 2 місяці тому

    su to a user only needs the other user's password to gain access to the other user's account. Not the root password (unless you're switching to root obviously).
    It is mentioned otherwise at the 1:52 mark

  • @ManeelxAkosAdor
    @ManeelxAkosAdor Рік тому +1

    You rock man! I am learning a lot with you

  • @samplesandtests
    @samplesandtests Рік тому

    if i want to make it so a user can run several different programs as sudo with out a password, do i do each program on it's own line or can i use a comma separated list? for example if i want them to be able to use fairly non destructive commands without a password (ls, cat , etc) but all others (vi, nano, apt) where they could change something i want the password prompt (to avoid scripts running commands as root without prompting). i know this question is as clear as mud so if you need me to rephrase let me know

    • @shawnp0wers
      @shawnp0wers  Рік тому

      I think both ways might work. I know you can make a comma separated list of commands as the last field. I'm not sure what multiple lines would do, like how priority works, if one would cancel out the previous, etc.

  • @scottb4029
    @scottb4029 Рік тому

    I know that doas is a BSD thing, but several Linux distros are using it now, when are they going to include it on the test?

    • @shawnp0wers
      @shawnp0wers  Рік тому

      I've honestly never heard of doas!

  • @MrMarcLaflamme
    @MrMarcLaflamme Рік тому

    Quick note to viewers - sometimes the sudo group is called wheel, not sudo.
    Also have a couple of questions for you.
    In Sudoers, what is the difference between members of admin may gain root privs and members of group sudo can execute any command?
    Typically when I would use su - is when I need to do multiple related tasks that all require escalation and just doing them as the root user eliminates the amount of times I need to type sudo (or sudo !! because I will inevitably forget! haha). Sometimes I've found that running certain scripts as sudo will fail because there are multiple things that run and sudo only seems to elevate the first command (how can I get around this?) Is there a way to enter into an elevated mode (like root) with your user account for a time and then exit when no longer needed? It's funny, I used to hate needing to run PowerShell as Administrator because they didn't have sudo but it's actually useful for instances like what I was describing.

    • @shawnp0wers
      @shawnp0wers  Рік тому +1

      Yeah, the multi-step thing can get frustrating when trying to do things "the right way" and use sudo instead of becoming the root user. Often, it's when a command has to open another shell to accomplish something, but occasionally I can't figure out why a command (or string of commands) fails. In those cases, I too just "become root" and do the command.
      I either do "sudo su -" or someone mentioned "sudo -i" will give you an interactive root shell. But I feel your pain!
      (And thanks for mentioning the wheel/sudo/admin group thing, different distros do handle admin privileges differently)

    • @MrMarcLaflamme
      @MrMarcLaflamme Рік тому

      @@shawnp0wers Well at least there's something comforting in knowing even the experts have this same dilemma! haha

  • @MattHartley-q8u
    @MattHartley-q8u Рік тому

    Sudooooo lol