How to Fix: Cannot login as any user other than root - no error message
Cannot login as any user other than root - no error message on Orange Pi PC v1.2 running Raspbian.
📋 Table of Contents
The user is experiencing an issue where they cannot login as any user other than root on their Orange Pi PC v1.2 running Raspbian, and no error message is displayed.
This issue affects users who have added additional users to the system using the `adduser` command, but are unable to access them through various means such as the console, `su`, or `ssh`.
⚠️ Common Causes
- The primary cause of this issue is likely due to the fact that the `authorized_keys2` file is not properly configured for the added users. The `authorized_keys2` file is used to store the public keys of users who have SSH access, but it may not be enabled or correctly configured on the system.
- Another possible cause could be related to the permissions and ownership of the `/home/mario` directory and the `~/.ssh/authorized_keys2` file. If these files are not properly set up, it may prevent users from accessing their accounts.
🔧 Proven Troubleshooting Steps
Enable SSH for added users
- Step 1: Check if the `authorized_keys2` file is enabled by running the command `grep -i 'authorized_keys2' /etc/ssh/sshd_config'. If it's not enabled, add the following line to the end of the file: `AuthorizedKeysFile /etc/ssh/authorized_keys2`. Then restart the SSH service with the command `service ssh restart'.
- Step 2: Verify that the public keys of added users are correctly stored in the `~/.ssh/authorized_keys2` file. Make sure that the files have the correct permissions and ownership. You can use the `chmod` and `chown` commands to set the correct permissions and ownership.
- Step 3: Test SSH access for an added user by running the command `ssh mario@orangepi'. If the connection is successful, it means that the issue is resolved.
Reset permissions and ownership of `/home/mario` and `~/.ssh/authorized_keys2`
- Step 1: Run the command `sudo chown -R mario:mario /home/mario' to change the ownership of the `/home/mario` directory to the added user.
- Step 2: Use the command `chmod -R 755 /home/mario' and `chmod -R 644 ~/.ssh/authorized_keys2' to set the correct permissions for the files. This will allow the added user to access their account.
✨ Wrapping Up
To resolve this issue, you can try either enabling SSH for added users or resetting the permissions and ownership of the `/home/mario` directory and `~/.ssh/authorized_keys2` file. If neither method works, it may be necessary to reset the password for an added user using the `passwd` command.
❓ Frequently Asked Questions
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Fix Pc crashes shortly after launching game (rainbow six siege). Compl
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: New PC build- no signal and no clue
Fix New PC build- no signal and no clue. Complete troubleshooting guid