General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Winnetou17
DistroTube
comments
Comments by "Winnetou17" (@Winnetou17) on "Why \"sudo\" when you can just \"su\"?" video.
Regarding logging in as another user (either fully, or just in a terminal session) is that yourself can be a danger. Say, you do take a break and come back some time later and forget that you're logged in as root (I know, in terminals you have a different prompt, but not everybody is used to that). And if you forget that you're logged as root, you might do things that you don't want to do. Commands that you run and that create files or folders, they will be owned by root. And you might find out later that your user doesn't have access to them or that some daemon cannot interact with said files anymore or things of that nature.
27
At the very end: DT: "You like my work ? Want to see more videos about Linux and free and open source software ? Subscribe to DistroTube over on Patreon. Allright guys, peace!" My mind after waiting 15 seconds "Arch &Fedora"
3
Oh, almost forgot. What does sudo provide over su using -c option ? It's still a one-time command, so the point about staying logged in as root is completely deflected. And not to mention that you don't need to bother with the wheel group and all that configuration. There's even less ways for hackers to do stuff (since you can't "su" from a bash script file, but you can sudo, if it has the permissions, say, if it's owned by your user). If you have sudo access, I don't know if disabling the root account helps that much (security-wise). You can still keep the nologin shell to keep ssh logins at bay. What am I missing ?
1