[Linux] su, sudo and other “switch user” commands

[Linux] su, sudo and other “switch user” commands 1. The difference between $ and # 2.su 3.su- 4.su-root 5.sudo 6. sudo -i 7. sudo su – 8. Summary The difference between 1.$ and # The beginning of $ indicates that this is not a command executed under the root user (administrator user). [ubuntu@Default:~]$ pwd /home/ubuntu […]

Linux commands – su, su -, sudo

The biggest difference between the sudo and su commands is: The sudo command requires the password of the current user, and the su command requires the password of the root user. Another difference is its default behavior. The sudo command only allows a single command to be run with elevated privileges, whereas the su command […]

Linux Sudo privilege escalation vulnerability reappears (CVE-2023-22809)

@[TOC](Linux Sudo privilege escalation vulnerability recurrence (CVE-2023-22809)) Foreword ● Vulnerability introduction: sudoedit in Sudo has a flaw in handling extra parameters passed in user-provided environment variables (such as SUDO_EDITOR, VISUAL, and EDITOR). When a user-specified editor contains the “-” parameter that bypasses the sudoers policy, a local attacker with sudoedit access can ultimately achieve privilege […]