Linux Crash Course - sudo

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 94

  • @OferSadan85
    @OferSadan85 2 ปีที่แล้ว +32

    I've been a Linux user for 15 years without knowing some of the basics you're teaching. Thank you!

  • @CjqNslXUcM
    @CjqNslXUcM 2 ปีที่แล้ว +16

    9:43
    another good tip is: !* is all arguments from the last command (not the command itself), super useful if you want to do a bunch of things to the same files
    !:1 is the first argument !:2 the second etc..
    !:1-3 group of arguments
    !$ last argument
    !:0 the command only (0th argument)

  • @Ollital
    @Ollital 2 ปีที่แล้ว +4

    I'm using sudo for many years now. Thanks to your video I'm understanding the /etc/sudoers file for the first time.

  • @Not-THAT-ChrisPratt
    @Not-THAT-ChrisPratt 2 ปีที่แล้ว +25

    Outstanding as always. I've been a Linux user for a few years now, but I always learn something from your videos. Thank you so much!

  • @souravpaul_per
    @souravpaul_per หลายเดือนก่อน +1

    Thanks Sir..this video is really informative.. thanks again.

  • @n0madfernan257
    @n0madfernan257 2 ปีที่แล้ว +4

    Channel underrated. Thanks for these lectures.

  • @jofastuff
    @jofastuff 2 ปีที่แล้ว +9

    Very informative video as usual, however, please note that allowing sudo access to apt (like in the example at @18:20) makes it trivially easy to escalate into a root shell (by appending -o APT::Update::Pre-Invoke::="/bin/bash" as an argument) and thus should be avoided.

  • @BigBlueMotors
    @BigBlueMotors 2 ปีที่แล้ว +6

    Love your Linux lessons - straight to the point without a lot of fluff. 👍 Fever distractions.

  • @OulahceneYousra
    @OulahceneYousra 9 หลายเดือนก่อน +1

    hey , i just wanna say that your videos are so informative and easy to grasp ,especially for a beginner like me who is still tyring to learn the ABc of linux , a huge thanks buddy

  • @abiolacomputing
    @abiolacomputing หลายเดือนก่อน +1

    Thank you for the lecture

  • @nirabhmani9523
    @nirabhmani9523 ปีที่แล้ว +2

    sudo -l command as well as visudo with different options of fixing the sudo file was fantastic!! 😃

  • @mila-sz7lz
    @mila-sz7lz 2 ปีที่แล้ว +7

    I think you have the most, if not the only, useful linux channel. Thank you man 🙏

  • @froid_san
    @froid_san 2 ปีที่แล้ว +2

    Great video! Now the thing i put or edit on sudoers files makes more sense. Hope in the future you tackle ACL.

  • @ObsidianMercian
    @ObsidianMercian 2 ปีที่แล้ว +2

    Awesome video as usual, I love this series. Thanks Jay!

  • @GuardianApe
    @GuardianApe 2 ปีที่แล้ว +3

    I love you man , thank you so much for these videos. I have a question. In what order am I to go through the Linux essentials playlist ?

  • @radioactive828
    @radioactive828 10 หลายเดือนก่อน +1

    THANK YOU THANK YOU THANK YOU! Really saved me SO much trouble! Subbed!

  • @skug978
    @skug978 2 ปีที่แล้ว +2

    As a Linux SysAdmin, I avoid using "sudo" for admin of Linux systems. With Debian Linux, "sudo" is not active by default, and the distro expects you to use the "root" account for maintenance. The preferred usage for "sudo" is for giving some elevated privileges to specific users, as you demonstrated. However, "sudo" isn't needed for working on Linux, and it comes down to preference - I feel you should have made that clear in your video. (I do agree that the root account shouldn't be accessible remotely, i.e. you need to logon to the machine as a regular user, then use "su -" to gain root after that.)

  • @CeeTheJay
    @CeeTheJay ปีที่แล้ว +3

    I've always pronounced it "pseudo," assuming it was GNU-style wordplay. It's a fake super user account, therefore: 'pseudo' (sudo). Does anyone else think of it this way? :)

  • @k.chriscaldwell4141
    @k.chriscaldwell4141 หลายเดือนก่อน

    I just learned that if you alias sudo with a trailing space you can get sudo to recognize the aliases defined for the user invoking sudo. ( alias sudo=“sudo “ ) Note the trailing space.

    • @Cool-Game-Dev
      @Cool-Game-Dev 12 วันที่ผ่านมา

      Sweet, the for tip

    • @Cool-Game-Dev
      @Cool-Game-Dev 12 วันที่ผ่านมา

      Thx for tip

  • @guypartush2976
    @guypartush2976 ปีที่แล้ว +1

    Dear Jay thank you very much for all your work and effort educating us with your vast knowledge. I am making my first cybersecurity steps and your videos are an enormous help!

    • @LearnLinuxTV
      @LearnLinuxTV  ปีที่แล้ว

      I’m glad my videos are a great help to you. Thank you so much for your kind comment.

  • @Indigenous_Patriot_1175
    @Indigenous_Patriot_1175 5 หลายเดือนก่อน

    I am new to Linux and Im loving your content. I am interested in running Arch Linux. I just watched this video and I notice while going along that visudo is not found in Arch.

  • @slaxmax9219
    @slaxmax9219 5 หลายเดือนก่อน

    It never gets to old ;)

  • @DL-xf3ur
    @DL-xf3ur 2 ปีที่แล้ว +1

    Thank you as always Jay! You're the best.

  • @Dean-vd5wr
    @Dean-vd5wr 2 ปีที่แล้ว +6

    Great video Jay. I am a newbie, and I'm still trying to understand the commands in the terminal.

  • @x91w
    @x91w 2 ปีที่แล้ว +1

    Jay, as usual nice presentation.
    The problem I found when working was big companies like IBM saying "MQ/DB2/WAS/etc can only be updated from root NOT sudo" and we had a method to temporarily change root, turn on insane syslog give it to IBM and change it back after and hope they hadn't installed some pkexec.c elevation stuff.
    How would you approach that problem ?
    Thankfully I'm now retired

  • @Liam_Tomhet
    @Liam_Tomhet 2 ปีที่แล้ว +1

    @10:20 as he stated: normally you would not edit/modify that file. Not sure if the same for arch linux. But in artix linux it is required modify that file to uncomment (delete #) the wheel group to allow sudo in that group.

    • @hvacmisadventures
      @hvacmisadventures 5 หลายเดือนก่อน

      I know it’s been a year since you commented but if you see this …
      That was a question I had: what is the best practice?
      Is it best to just add users to sudo group and leave the file alone except for special circumstances?

    • @Liam_Tomhet
      @Liam_Tomhet 5 หลายเดือนก่อน

      @@hvacmisadventures best practice is to leave it unless required otherwise.

    • @hvacmisadventures
      @hvacmisadventures 5 หลายเดือนก่อน

      @@Liam_Tomhet thanks man 🫡

  • @NoEgg4u
    @NoEgg4u 2 ปีที่แล้ว +4

    @20:50 -- "NOPASSWD"
    What if there were some commands where you do not want to be asked for a password, and other commands where you do want to be asked for the password?
    How would that syntax be laid out in the sudoers file?

    • @d00dEEE
      @d00dEEE 2 ปีที่แล้ว +2

      Just add multiple lines, one with NOPASSWD and the other without. There might be ordering issues, so try it and if it doesn't work one way, swap the NOPASSWD line before or after the other one for a given user.

  • @LeonardoMarioMartinez
    @LeonardoMarioMartinez 2 ปีที่แล้ว +1

    Another interesting thing is the use of the /etc/sudoers.d/ directory for custom setup. It's a more clear aproach and a better way to manage users and groups privileges.

  • @Im.Tabachnik
    @Im.Tabachnik 2 ปีที่แล้ว +1

    I love the way you teach, and I learn from you a lot, Thank you for all the great investment.
    and I will happy if you can create a video about NFS share from Linux to Linux\Windows.

  • @darren537
    @darren537 2 ปีที่แล้ว +2

    Thanks! Can you please do an install and walk through of EndeavorOS for beginners that are interested in ARCH,pacman and the AUR but are intimidated by the are way installation?

    • @systemuser9636
      @systemuser9636 2 ปีที่แล้ว

      @Darren hey man I just switched from Ubuntu to Endeavour. That would be a great video.

    • @rahilarious
      @rahilarious 2 ปีที่แล้ว

      i think this channel is more targeted towards server linux than desktop. For arch content u should ermano ferrari

  • @relytheone853
    @relytheone853 ปีที่แล้ว

    More videos like this, please!

  • @framebrain
    @framebrain ปีที่แล้ว

    Thanks Jay! Great content

  • @TheExard3k
    @TheExard3k 2 ปีที่แล้ว +1

    neofetch next? :)

  • @darklinux_
    @darklinux_ 11 หลายเดือนก่อน

    Very very good your explain. Thanks a lot

  • @catupeloco
    @catupeloco 2 ปีที่แล้ว

    I'll leave the video with something New. Sudo !! Is a good one

  • @TMavC5
    @TMavC5 2 ปีที่แล้ว

    I like to see ESXI with VM of Ubuntu GPU passthrough in this channel.

  • @jayvuillermin1414
    @jayvuillermin1414 5 หลายเดือนก่อน

    Hey Jay, I love your content bro, sorry, this is a bit unrelated, but while watching this video I was playing around and I ran HTOP and grepped for systemd on kali 2024. I slowed my system right down which I can't say I was surprised by. So I thought after a few seconds, I'll Control+C out of this. I did and all was well. I sort of accidentally knocked my mouse and noticed something odd. I noticed that the terminal started printing what I believe was my wireless mouse' current position in some kind of code (coordinates) that constantly changed depending on where I'd move the mouse. I'm a noob. I listen and watch and re-watch again and again to cement it in my head which is what I was doing (listening to you) while doing something else when I noticed this. Could just be my system. Maybe you can replicate it? Maybe you're already well aware of it? Maybe it's nothing? To me it was odd. I know to you it'll be nothing new but it was really interesting mate. Hey, thanks for the time you take and the energy you put in to educate and help others! We need more folks like you mate. Cheers

  • @amanwehib8367
    @amanwehib8367 2 ปีที่แล้ว

    Clear and concise!!!!!!!!!!!

  • @richardkruse4663
    @richardkruse4663 6 หลายเดือนก่อน

    I know this is old, but what's new is that in Debian-12, neither the 'adduser' command nor the 'usermod' command is available.even as 's -'. Any comment? (I enjoy your 'Learn Linux TV' posts!)

  • @mahsumsaetgareev
    @mahsumsaetgareev 2 ปีที่แล้ว +1

    I am new to linux, so I am sorry if I ask silly question. Isn't there a user jay in the system and if so shouldn't information about it be in sudoers?

    • @Gaius__
      @Gaius__ หลายเดือนก่อน

      Yes, there is a user jay. But no need to add him to the sudoers file specifically, because jay is a member of group sudo, which gets its authorisations from the settings for %sudo.
      In the sudoers file, % refers to a group.

  • @attscham7820
    @attscham7820 หลายเดือนก่อน

    nice video. tks

  • @mramosch
    @mramosch ปีที่แล้ว

    Created a ‘tux’ user without any further changes and this user can reboot the machine running RaspberryOS - That doesn’t seem appropriate…

  • @zeppelinmexicano
    @zeppelinmexicano 9 หลายเดือนก่อน

    With regard to that botched sudoers file, does the errant "ALL" affect just user tux, or is the file then just botched for all use?

  • @kiasalimi5108
    @kiasalimi5108 9 หลายเดือนก่อน

    thank you for the content, A++++

  • @andrewmunro8830
    @andrewmunro8830 2 ปีที่แล้ว

    Newish to Linux and I'm sure I should have more insightful questions by now, but what I really want to know is ... what's the font in your terminal emulator? I really like the @ symbol!

    • @adaum79
      @adaum79 2 ปีที่แล้ว +2

      Fira Code, I guess

    • @andrewmunro8830
      @andrewmunro8830 2 ปีที่แล้ว +1

      @@adaum79 Amazing, thanks!

  • @noonewhocares654
    @noonewhocares654 ปีที่แล้ว

    excelent!

  • @kamertonaudiophileplayer847
    @kamertonaudiophileplayer847 2 ปีที่แล้ว

    Anyway, if you do sudo, somehow it will consider your home directory as /root, how can I keep it as /home/user?

  • @jothamsia
    @jothamsia ปีที่แล้ว

    Is it possible to make specific sudo commands to require password

  • @JefferyOwusu-ft8ci
    @JefferyOwusu-ft8ci 5 หลายเดือนก่อน

    how do i set password to my root when using ssh root@ip

  • @efeley44
    @efeley44 2 ปีที่แล้ว

    Guys help!!!!!
    When I try to put my password, it says password invalid. I don't why tho cuz it's literally is my account password, what should I do?

  • @temoshee7477
    @temoshee7477 2 ปีที่แล้ว +1

    Why is the 'jay' user not in the sudoers file?

    • @TheDillio187
      @TheDillio187 2 ปีที่แล้ว +3

      jay is a member of the sudoers group

  • @cristoforopontikas
    @cristoforopontikas 2 ปีที่แล้ว

    Hello, great video but i would like to mention that the last command for the NOPASSWD isn’t correct.
    I have give it a try and verify that the correct line to type is the next one. Suppose the user is called chris
    chris ALL=(ALL) NOPASSWD:ALL
    if you type as you describe then it want work. Al least on Raspberry os 64 bit latest official release
    chris ALL=(ALL:ALL) NOPASSWD:
    This will not work. Why?

    • @Gaius__
      @Gaius__ หลายเดือนก่อน

      Wrong syntax. You have not specified commands for the NOPASSWD directive. They way you have typed it, NOPASSWD: would be the only command that user could use. And the command NOPASSWD: doesn't exist, of course.

  • @shkjuy6935
    @shkjuy6935 2 ปีที่แล้ว +1

    Thnx

  • @Steamrick
    @Steamrick 2 ปีที่แล้ว

    Sudo? The thing that CVE-2021-4034 has made superfluous?

    • @LearnLinuxTV
      @LearnLinuxTV  2 ปีที่แล้ว

      Unless I'm misunderstanding your comment, that CVE specifically refers to polkit not sudo. Unless you're referring to a vulnerability chain, but vulnerabilities and chaining vulnerabilities is not uncommon.

    • @Steamrick
      @Steamrick 2 ปีที่แล้ว +1

      @@LearnLinuxTV I was basically referring to a comment in the Veeam Newsletter (formally "Veeam R&D Forums Digest"), trying to poke some fun:
      "Another way to look at it: that sudoers file was completely optional for the past 12 years, as anyone in the know could just run any command as root"

  • @AliTwaij
    @AliTwaij 2 ปีที่แล้ว

    excellent thabkyou

  • @ravitejareddy3818
    @ravitejareddy3818 ปีที่แล้ว

    Is this for linux admin?

  • @El_Bartto
    @El_Bartto 11 หลายเดือนก่อน

    using linux for the first time, sudo asks me for a password, which password is that? the one that I use to log in or the super user one?

    • @jagadeesh9074
      @jagadeesh9074 9 หลายเดือนก่อน

      the one that use to log in

  • @abdulqayyumshah9217
    @abdulqayyumshah9217 2 ปีที่แล้ว

    Great

  • @belldiogbo2193
    @belldiogbo2193 2 ปีที่แล้ว

    How can I reach you I need to get some more lesson on linode

    • @LearnLinuxTV
      @LearnLinuxTV  2 ปีที่แล้ว +2

      There's a "request assistance" page on the main website. But I'm already working on new Linode content, so it's possible that content might already address your question.

  • @semikolondev
    @semikolondev 2 ปีที่แล้ว +2

    Sudo win lottery

  • @davidpark5188
    @davidpark5188 2 หลายเดือนก่อน

    great 👍; bis bis …

  • @jeremyleonbarlow
    @jeremyleonbarlow 2 ปีที่แล้ว

    sudo apt install doas, sudo dnf install doas, or sudo pacman -S doas is what I've heard is the best use of sudo.

  • @bernard1475
    @bernard1475 2 ปีที่แล้ว

    doas* ;p

  • @fsxspen
    @fsxspen ปีที่แล้ว

    Q is a stupid option

  • @tacticaldepartment1929
    @tacticaldepartment1929 2 ปีที่แล้ว

    can you tich me sir linux

  • @vampiregoat69
    @vampiregoat69 8 หลายเดือนก่อน

    So you don't tell people how to install sudo since you have it already that is a bit messed up I thought this was LEARNING to do not I have it already if you don't tough sht

    • @SR-mj9ei
      @SR-mj9ei 7 หลายเดือนก่อน

      As root "apt install sudo"
      Edit: replace apt with your package manager dnf pacman etc

  • @evodefense
    @evodefense 11 หลายเดือนก่อน

    thx