Given that root has all privileges, why is root ALL=(ALL) ALL in /etc/sudoers? [duplicate]
This question already has an answer here:
Why does the root user need sudo permission?
3 answers
I looked at this question:
Trying to understand the difference between “modernNeo ALL=(ALL:ALL) ALL” and “modernNeo ALL=(ALL) ALL” in the sudoers file
I still have a question. Since the "root" user has all privileges, why is root ALL=(ALL) ALL
in /etc/sudoers
on Linux systems?
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
I tried to comment it out, and the root user still had all privileges, it doesn't affect the root user at all. It looks like root ALL=(ALL) ALL
is useless.
sudo root
New contributor
marked as duplicate by Jeff Schaller, Braiam, Stephen Kitt, Christopher, Wouter Verhelst yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Why does the root user need sudo permission?
3 answers
I looked at this question:
Trying to understand the difference between “modernNeo ALL=(ALL:ALL) ALL” and “modernNeo ALL=(ALL) ALL” in the sudoers file
I still have a question. Since the "root" user has all privileges, why is root ALL=(ALL) ALL
in /etc/sudoers
on Linux systems?
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
I tried to comment it out, and the root user still had all privileges, it doesn't affect the root user at all. It looks like root ALL=(ALL) ALL
is useless.
sudo root
New contributor
marked as duplicate by Jeff Schaller, Braiam, Stephen Kitt, Christopher, Wouter Verhelst yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
People should remember that sudo is a package. You can actually still install Debian without sudo, and add it later by sudo apt install sudo ... naturally, if sudo is going to wrap around root for non-super users, it would need to define root in its configuration, along with the other users that contain the same privilege.
– oemb1905
yesterday
1
And ... on freeBSD, the default installation does not even contain sudo. Sudo stands for "su" and "do" commands, or switch user and to do ... it was added early on to stop harm that could happen from always being the root user, as I understand it. But it is not required at all ... fyi
– oemb1905
yesterday
add a comment |
This question already has an answer here:
Why does the root user need sudo permission?
3 answers
I looked at this question:
Trying to understand the difference between “modernNeo ALL=(ALL:ALL) ALL” and “modernNeo ALL=(ALL) ALL” in the sudoers file
I still have a question. Since the "root" user has all privileges, why is root ALL=(ALL) ALL
in /etc/sudoers
on Linux systems?
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
I tried to comment it out, and the root user still had all privileges, it doesn't affect the root user at all. It looks like root ALL=(ALL) ALL
is useless.
sudo root
New contributor
This question already has an answer here:
Why does the root user need sudo permission?
3 answers
I looked at this question:
Trying to understand the difference between “modernNeo ALL=(ALL:ALL) ALL” and “modernNeo ALL=(ALL) ALL” in the sudoers file
I still have a question. Since the "root" user has all privileges, why is root ALL=(ALL) ALL
in /etc/sudoers
on Linux systems?
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
I tried to comment it out, and the root user still had all privileges, it doesn't affect the root user at all. It looks like root ALL=(ALL) ALL
is useless.
This question already has an answer here:
Why does the root user need sudo permission?
3 answers
sudo root
sudo root
New contributor
New contributor
edited 2 days ago
Jeff Schaller
39.6k1054126
39.6k1054126
New contributor
asked 2 days ago
Bruce XieBruce Xie
14614
14614
New contributor
New contributor
marked as duplicate by Jeff Schaller, Braiam, Stephen Kitt, Christopher, Wouter Verhelst yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Jeff Schaller, Braiam, Stephen Kitt, Christopher, Wouter Verhelst yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
People should remember that sudo is a package. You can actually still install Debian without sudo, and add it later by sudo apt install sudo ... naturally, if sudo is going to wrap around root for non-super users, it would need to define root in its configuration, along with the other users that contain the same privilege.
– oemb1905
yesterday
1
And ... on freeBSD, the default installation does not even contain sudo. Sudo stands for "su" and "do" commands, or switch user and to do ... it was added early on to stop harm that could happen from always being the root user, as I understand it. But it is not required at all ... fyi
– oemb1905
yesterday
add a comment |
People should remember that sudo is a package. You can actually still install Debian without sudo, and add it later by sudo apt install sudo ... naturally, if sudo is going to wrap around root for non-super users, it would need to define root in its configuration, along with the other users that contain the same privilege.
– oemb1905
yesterday
1
And ... on freeBSD, the default installation does not even contain sudo. Sudo stands for "su" and "do" commands, or switch user and to do ... it was added early on to stop harm that could happen from always being the root user, as I understand it. But it is not required at all ... fyi
– oemb1905
yesterday
People should remember that sudo is a package. You can actually still install Debian without sudo, and add it later by sudo apt install sudo ... naturally, if sudo is going to wrap around root for non-super users, it would need to define root in its configuration, along with the other users that contain the same privilege.
– oemb1905
yesterday
People should remember that sudo is a package. You can actually still install Debian without sudo, and add it later by sudo apt install sudo ... naturally, if sudo is going to wrap around root for non-super users, it would need to define root in its configuration, along with the other users that contain the same privilege.
– oemb1905
yesterday
1
1
And ... on freeBSD, the default installation does not even contain sudo. Sudo stands for "su" and "do" commands, or switch user and to do ... it was added early on to stop harm that could happen from always being the root user, as I understand it. But it is not required at all ... fyi
– oemb1905
yesterday
And ... on freeBSD, the default installation does not even contain sudo. Sudo stands for "su" and "do" commands, or switch user and to do ... it was added early on to stop harm that could happen from always being the root user, as I understand it. But it is not required at all ... fyi
– oemb1905
yesterday
add a comment |
1 Answer
1
active
oldest
votes
That entry ensures that root
can run sudo
. If you comment it out,
sudo ls
run as root
will fail.
It’s a convenience: it means users can run sudo
commands without thinking about things too much, i.e. they’ll work the same way whether they’re running as a sudo
-enabled user or root
(whether that’s a good idea is another question). It also means that scripts can use sudo
to request root
privileges, and still work without issue when they’re run as root
directly.
looks like that, I got it, thank you!
– Bruce Xie
2 days ago
10
It also allows root to become another user which is handy if you need to debug something or want to run something with limited privileges.
– eckes
2 days ago
5
@eckes indeed; androot
can do that using a variety of tools, without a password (su
for example).
– Stephen Kitt
2 days ago
5
@StephenKittsudo
also sanitizes the environment when you switch users with it, which is kind of important if you're debugging things.
– Austin Hemmelgarn
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
That entry ensures that root
can run sudo
. If you comment it out,
sudo ls
run as root
will fail.
It’s a convenience: it means users can run sudo
commands without thinking about things too much, i.e. they’ll work the same way whether they’re running as a sudo
-enabled user or root
(whether that’s a good idea is another question). It also means that scripts can use sudo
to request root
privileges, and still work without issue when they’re run as root
directly.
looks like that, I got it, thank you!
– Bruce Xie
2 days ago
10
It also allows root to become another user which is handy if you need to debug something or want to run something with limited privileges.
– eckes
2 days ago
5
@eckes indeed; androot
can do that using a variety of tools, without a password (su
for example).
– Stephen Kitt
2 days ago
5
@StephenKittsudo
also sanitizes the environment when you switch users with it, which is kind of important if you're debugging things.
– Austin Hemmelgarn
2 days ago
add a comment |
That entry ensures that root
can run sudo
. If you comment it out,
sudo ls
run as root
will fail.
It’s a convenience: it means users can run sudo
commands without thinking about things too much, i.e. they’ll work the same way whether they’re running as a sudo
-enabled user or root
(whether that’s a good idea is another question). It also means that scripts can use sudo
to request root
privileges, and still work without issue when they’re run as root
directly.
looks like that, I got it, thank you!
– Bruce Xie
2 days ago
10
It also allows root to become another user which is handy if you need to debug something or want to run something with limited privileges.
– eckes
2 days ago
5
@eckes indeed; androot
can do that using a variety of tools, without a password (su
for example).
– Stephen Kitt
2 days ago
5
@StephenKittsudo
also sanitizes the environment when you switch users with it, which is kind of important if you're debugging things.
– Austin Hemmelgarn
2 days ago
add a comment |
That entry ensures that root
can run sudo
. If you comment it out,
sudo ls
run as root
will fail.
It’s a convenience: it means users can run sudo
commands without thinking about things too much, i.e. they’ll work the same way whether they’re running as a sudo
-enabled user or root
(whether that’s a good idea is another question). It also means that scripts can use sudo
to request root
privileges, and still work without issue when they’re run as root
directly.
That entry ensures that root
can run sudo
. If you comment it out,
sudo ls
run as root
will fail.
It’s a convenience: it means users can run sudo
commands without thinking about things too much, i.e. they’ll work the same way whether they’re running as a sudo
-enabled user or root
(whether that’s a good idea is another question). It also means that scripts can use sudo
to request root
privileges, and still work without issue when they’re run as root
directly.
edited 2 days ago
answered 2 days ago
Stephen KittStephen Kitt
167k24376454
167k24376454
looks like that, I got it, thank you!
– Bruce Xie
2 days ago
10
It also allows root to become another user which is handy if you need to debug something or want to run something with limited privileges.
– eckes
2 days ago
5
@eckes indeed; androot
can do that using a variety of tools, without a password (su
for example).
– Stephen Kitt
2 days ago
5
@StephenKittsudo
also sanitizes the environment when you switch users with it, which is kind of important if you're debugging things.
– Austin Hemmelgarn
2 days ago
add a comment |
looks like that, I got it, thank you!
– Bruce Xie
2 days ago
10
It also allows root to become another user which is handy if you need to debug something or want to run something with limited privileges.
– eckes
2 days ago
5
@eckes indeed; androot
can do that using a variety of tools, without a password (su
for example).
– Stephen Kitt
2 days ago
5
@StephenKittsudo
also sanitizes the environment when you switch users with it, which is kind of important if you're debugging things.
– Austin Hemmelgarn
2 days ago
looks like that, I got it, thank you!
– Bruce Xie
2 days ago
looks like that, I got it, thank you!
– Bruce Xie
2 days ago
10
10
It also allows root to become another user which is handy if you need to debug something or want to run something with limited privileges.
– eckes
2 days ago
It also allows root to become another user which is handy if you need to debug something or want to run something with limited privileges.
– eckes
2 days ago
5
5
@eckes indeed; and
root
can do that using a variety of tools, without a password (su
for example).– Stephen Kitt
2 days ago
@eckes indeed; and
root
can do that using a variety of tools, without a password (su
for example).– Stephen Kitt
2 days ago
5
5
@StephenKitt
sudo
also sanitizes the environment when you switch users with it, which is kind of important if you're debugging things.– Austin Hemmelgarn
2 days ago
@StephenKitt
sudo
also sanitizes the environment when you switch users with it, which is kind of important if you're debugging things.– Austin Hemmelgarn
2 days ago
add a comment |
People should remember that sudo is a package. You can actually still install Debian without sudo, and add it later by sudo apt install sudo ... naturally, if sudo is going to wrap around root for non-super users, it would need to define root in its configuration, along with the other users that contain the same privilege.
– oemb1905
yesterday
1
And ... on freeBSD, the default installation does not even contain sudo. Sudo stands for "su" and "do" commands, or switch user and to do ... it was added early on to stop harm that could happen from always being the root user, as I understand it. But it is not required at all ... fyi
– oemb1905
yesterday