Differences between "SUDO" and "SU"
Differences Between “sudo” and “su”
Topic
|
Su
(Switch User)
|
Sudo
(Super user do)
|
Password
|
“Su” requires root user
password to switch
Note – sharing root user
password is not recommended
|
“Sudo” requires current
user password
Note – Sudo is better
between the two as far as security is concerned.
|
Behavior
|
“Su” can let a user to have
new shell, It can allow user to run as many commands as user wants with root
privilege until user exits the shell
Note – Giving full
privileged to a standard user is not recommended, Sometimes user can forget
the fact that they are working as root and might inadvertently make some
irrecoverable changes,
|
“Sudo” can let a user to
run single command with elevated(root) privileges,
|
Logging
|
It is not possible to directly
trace what user was doing when they switch to root account
|
Change logs are recorded
and tagged with sudoer’s username,
|
User can switch to any user
with new shell without target user’s password. You can run the following
command
# Sudo su
Post a Comment