su: Incorrect Password - Troubleshooting Guide
If you receive the 'su: incorrect password' error message when trying to switch to the root user using the su command and also see a mail notification in '/var/spool/mail/work', it likely means that you entered the incorrect root user password.
Please ensure that you are entering the correct root user password. Note that passwords are case-sensitive, so make sure you are entering the correct capitalization.
If you are unsure of the root user password or have forgotten it, you can try one of the following methods:
- Using the sudo command: If your user account has sudo privileges and is configured in the sudoers file to allow the use of the sudo command, you can use the sudo command to execute commands that require root privileges. In the terminal, type the following command and press Enter:
sudo command
Replace 'command' with the actual command you want to execute as root. Then enter your current user's password and press Enter to execute the command.
- Resetting the root password: If you have completely lost access to the root user password, you can try to recover access by resetting the root password. The specific steps may vary depending on your Linux distribution, but typically you can boot into recovery mode and then use a root shell to reset the root password. Refer to your Linux distribution's documentation or guides for detailed steps.
Please note that resetting the root password requires physical access or administrator privileges and should be done with caution. Ensure you understand the steps involved and make sure to change the password to a strong one after resetting it.
If you are still unable to resolve the issue, please refer to relevant Linux documentation or seek further help and support from the Linux community.
原文地址: https://www.cveoy.top/t/topic/bWsr 著作权归作者所有。请勿转载和采集!