Questions tagged [sudo]

`sudo` is a command that allows a user to use commands with the privileges of another user, usually the root user.

sudo is a command that allows a user to use commands with the privileges of another user, usually the root user.

The difference with su is that su allows a user to become another user, and remain that user until they log out. sudo, by contrast, allows a user to execute one commend with another users privileges.

To use sudo, a user needs to enter their password, to once again verify that they are who they claim to be. Note that it is the user's own password, not the root password, that is required to use sudo.

On some systems, like Ubuntu, the root user is disabled by default, to prevent people from gaining root access by guessing the password. A user with the appropriate sudo privileges can then perform commands with root privileges by prefixing their command with sudo.

78 questions
0
votes
2 answers

Prevent program from switching to user without password

I created a user with useradd without specifying a password. When I try to sudo -u theuser echo hi I am being prompted for my admin password (unless specified otherwise in the sudoers file, of course). su -c "echo hi" -s /bin/sh theuser asks for…
phil294
  • 1,032
  • 2
  • 6
  • 11
0
votes
1 answer

/etc/sudoers file with permissions set to 640 instead of 0440: what does it mean?

So I'm still new to GNU/Linux: recently I installed Debian 9.1 with KDE. Now after executing: stat --format '%a' /etc/sudoers I found out that my sudoers file has the 640 permissions instead 0440 set. I changed this by running pkexec chmod 0440…
mYnDstrEAm
  • 319
  • 2
  • 17
-1
votes
2 answers

Is it dangerous to turn on internet connection under su -c?

If someone would turn on internet connection using command su -c "/sbin/ifup ppp1" would it put system at risk (how bad) ?
R S
  • 225
  • 2
  • 7
1 2 3 4 5
6