8 points

Yea, I don’t think you understand what you’re saying. Security is not a binary thing - it’s layered. And your user is not, in fact, authorised to do pretty much anything outside your homedir.

permalink
report
reply
-1 points

If the user is in the sudoers file, they are authorized to do the things configured there.
Which is obvious when they can do the thing after entering their own password.

But since they already entered the same password at login, and are still logged in, there’s no point in entering the same password one more time.
If that’s your idea for security, you might as well pop up another password prompt every half hour to check that the same person is still on the PC.

The argument “a password prompt tells the user to stop and think” is wrong. That’s not what a password prompt’s purpose is.
For that, you can pop up a confirmation dialog, or even a text box where they have to type in “yes”.
Using a password for anything other than proving the correct user is at the keyboard makes it less secure.

This is why Active Directory and Kerberos are so great. You log in once in the morning, and that’s it.
And since you only have to type in your password once before work, it can be really secure and long.
Also, the chance of someone standing behind you while you type it is reduced.

permalink
report
parent
reply
4 points

If the user is in the sudoers file, they are authorized to do the things configured there.

Correct. But the thing configured there is “to act on behalf of root for these items”, not the “things” themselves.


Which is obvious when they can do the thing after entering their own password.

$ touch file1
$ sudo touch file2
$ ls -l file{1,2}
-rw------- 1 illecors   illecors   0 Nov 12 14:56 file1
-rw------- 1 root       root       0 Nov 12 14:56 file2

It is not you executing stuff with sudo. file1 is owned by you, but file2 is owned by root.


But since they already entered the same password at login, and are still logged in, there’s no point in entering the same password one more time.

There is a point. See above.


The argument “a password prompt tells the user to stop and think” is wrong.

That’s not an argument I’ve made, nor make.


For that, you can pop up a confirmation dialog, or even a text box where they have to type in “yes”.

Both of which are much easier to defeat than a pop up confirmation dialog with a text box for your password.


Using a password for anything other than proving the correct user is at the keyboard makes it less secure.

No it doesn’t - you seem to be making things up to justify your lack of understanding. Authentication is not the same as authorisation, nor should it be treated the same way.

When you type in your password on a login prompt - you authenticate who you are.

When you type in your password on a sudo prompt - you authorise a command to be carried out on behalf of root.


This is why Active Directory and Kerberos are so great. You log in once in the morning, and that’s it.

I’m not sure you realise how little you do on a windows machine. Good luck installing system software or altering system files on an AD managed Windows machine without authorisation. Which is what your meme(?) is implying.


And since you only have to type in your password once before work, it can be really secure and long.

There is no justification here, just a manufactured statement.


Also, the chance of someone standing behind you while you type it is reduced.

See above.

permalink
report
parent
reply
6 points

You are not the only one able to execute code under your user’s name. A normally installed program, running under your directive as user, can run other commands under your authority as user.

But it can’t run as root. You can run things as root via sudo, when you prove your identity as yourself - with the password - rather than another program operating in your name.

Passwordless sudo I think could be exploited e.g. by writing a script and passing it to bash.

(Or, as another reply pointed out, it provides a barrier against moderate malice of a passer-by or a ‘friend’ temporarily using your computer.)

permalink
report
reply
4 points
*

Should be called medo

vim ~/.bashrc
alias medo=sudo
:wq
permalink
report
reply
2 points

You want su. sudo is something else. It doesn’t do things the way you want them to be done. The way it does things is correct for its use cases. You don’t want to see that. So just fucking use su and leave us alone.

permalink
report
reply
-11 points
*

Either I have the right to perform the operation, or I don’t.
If I don’t, ask me for the password of someone who does.
If I do, ask me if I really want to elevate, but don’t make me jump through hoops.
A prompt for my own password is nonsensical at this point.
And it reduces security, cause users choose a simpler password if they have to type it more often.

permalink
report
reply
14 points

The prompt for your password is to prevent someone that happens upon your unlocked computer to take it over. Also I think knowing which commands can be run as superuser by a given user is considered a security issue, hiding that info behind a password prompt should at least help.

You can turn just turn the prompt off by adding NOPASSWD to your account in the sudoers file(s).

permalink
report
parent
reply
13 points

Pro-tip: Don’t turn off the password requirement.

permalink
report
parent
reply
-13 points

Pro-tip: Don’t use sudo

permalink
report
parent
reply
-7 points
*

When someone has physical access to my unlocked computer, everything is already lost.
Then they have access to all my private files, and the system has to be considered as compromised.

And I know I can turn it off. But the standard that most distros use out of the box asks an already authenticated user to authenticate with the same method again.
Which is a security issue and a usability nightmare. Ideally, you should be prompted for your password so little that you can make it a long passphrase.

permalink
report
parent
reply
2 points

yk you can change that in the sudoers file tho right?
you can make it ask for the root user’s password for elevation … or even make it passwordless but that’s a bad idea

permalink
report
parent
reply
0 points

to me all sudo features make absolutely sense (except for too loose wildcard handling), also from a security point of view. if you dislike how its ‘default’ settings for your distro are like, change them to your needs or seek a distro that fits your needs. other way is dont use sudo, login as root directly, nothing hinders you (maybe your distros default setup that does not assume root login, then you’ld have to give root a password maybe) or write your own sudo alike security system if you like.

if you dislike security at all, do everything directly as root (also web browsing), put nopasswd foe your user into your sudoers file or go to puppy linux (afair there is only the root user and thus no boundary between user and root) but as soon as you encounter any Problems related to user-was-also-root, you ‘might’ have wanted such features … afterwards then ;-)

simple reasons to let the user input his password before running things with higher privileges:

  • trigger the user to start the brian activity called ‘thinking’ before beeing allowed to go on.
  • user uses a webbrowser that could be RCE’d by some webpage to execute a shell then running anything as root on your machine.
permalink
report
parent
reply

Linuxsucks

!linuxsucks@lemmy.world

Create post

Rules:

  1. FOSS advocates and Linux evangelists aren’t welcome. -We ask that you block us.
  2. Moderation is heavy handed. Try to stay on topic (that is LINUXSUCKS!).
  3. No Complaining Mute the sub if users, content, or rules bother you *it’s ok to report rule violations

Community stats

  • 1K

    Monthly active users

  • 294

    Posts

  • 1.2K

    Comments