Sudo for all my commands for me

Would be very possible if he does everything with sudo:partying_face:

2 Likes

For us or him?

1 Like

Typos happen a lot quicker than one might think.
If not yours, it’s certainly my experience.

One not unimportant question:
How often do you think you need sudo?
… actually not very often

And you can set the system up to allow certain commands as root but without a password
if typing the password once a blue moon is still too much. :wink:

No.

Windows was born single-user. Network was an afterthought.

Linux is born network and multi-user.

Everything is build around permissions - so what you are asking may be possible but you get weird issues when you mess with permissions on system files.

You cannot come back here and ask for help with issues as it will be impossible to fix.

You could just enable root login in the display manager configuration.

Then login with root - but you will soon regret this.

9 Likes

No, you’re wrong. Every process that you start runs with the privileges of your user account, and if you allow your user account to elevate its privileges without requiring authentication, then every process you run can do the same thing, including the web-hosted scripts running in your browser.

So don’t do that! Thou hast been warned!

2 Likes

which then spawn a socket to a c&c where the operators of the bot net will laugh their ass off and make lifetime jokes about the sucker logged in as root.

6 Likes

“Hey, look at that IP address! I know this guy!”
-─ “Whohoa, he switched to Linux! And he was so joyfully running Windows as administrator until just a few days ago! Okay, now we have to switch to the Linux version of our rootkit.”
(cynical laughter)

:laughing:

4 Likes

guys, thanks a lot for your advice. Especially by @linux-aarhus . It’s explains me smth.

Then I get another question. Can I run my apps from simple menu with root or create some shortcuts in menu like “run wireshark” and “run wireshark as root”.

And is it right if I change ownership of all files in my hard drives with files (ntfs) using

sudo chown -R echo /drive/hdd/*

that I could play them from vlc.

Normally, yes. You’ll have to prefix the commands they invoke with pkexec, though.

No. NTFS does not support POSIX file ownership and permissions, so they are emulated in the virtual filesystem layer of the kernel when the NTFS partition is mounted, and they apply to the whole filesystem. The cannot be altered and they cannot be set for individual files.

1 Like

The only time you should need superuser privileges is when you actually need to change something in your system, such as installing/updating packages.
Some applications may require specific yet limited access to parts of the system. But in such cases, they usually create a dedicated user/group, that only access those limited parts, thus not actually requiring superuser privileges. And in those cases, there is documentation on what you may need to do in order to use them.

The broad logic is: superuser privileges shall be acquired only when really necessary, and not as an easy workaround.

2 Likes

Thanks everyone.

1 Like

Yup.

:rofl: :rofl: :rofl:

Do not run Wireshark as root, it is insecure. Wireshark has implemented privilege separation, which means that the Wireshark GUI (or the tshark CLI) can run as a normal user while the dumpcap capture utility runs as root[1].

Wireshark - ArchWiki

3 Likes

Unix way is to login as root. sudo is regarded as system weakness, especially without password…

If that were true, why is the default user/login not root?
Also, if sudo is such a weakness, why is it required for so many administrative tasks?

1 Like

Listen I was surprised when I first saw sudo. default login what is default login?

Default login is for you to set up with installation, and log in as root is expressly advised against. Especially for the GUI.

And sudo had a security vulnerability. Note: had. It’s been long patched.

So please get your facts straight before you say such things. And be careful that you’re not misled. Because, I don’t know where you got the info, but either the source wants to mislead you for which ever reason, youy’re way to gulliuble* or you’re trying to cause someone harm here.


* Interesting: “gullible” also sounds like “bubblegum” when you say it sowly.

1 Like

i think you should read a bit about the purpose of sudo and permissions in general. it is meant to protect the system. The idea is that files should only have the bare minimum permissions to do what they need to do. for example, some random file should not have permissions to change the system because those permissions are extraneous to the file’s purpose and they could present a hazard to the system.
let’s say I run a program as the super user (sudo stands for super user do). that program then has the permissions to do whatever it wants with the system. if the user is inexperienced, this could lead to them doing damage to their system.

I’m also somewhat new to gnu/linux, so it was hard to understand the purpose of sudo and permissions at first. here is a short article you can read ( A beginner's guide to Linux permissions | Opensource.com ) im sure you could find youtube videos or something else explaining the topic better.

1 Like

I followed this manual.
Then after this command I’m able to capture packets without sudo.

sudo chmod g+x /usr/bin/dumpcap

I hope I get it right.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.