Hello Everyone,
I have an issue to login with the “root” user.
Before it worked very well by “root” with an empty password.
But now when I use the login by “root”, it asks me the password. But I don’t have the password. I try password like “root”, empty… But I am failed.
More information:
I don’t change anything
I can login with another user with its password
I have a big file /var/logs/btmp (I don’t know if this can be a problem or not)
Hi @gongfu , You mentioned that you “disk space” is 95% full? It’s a really bad situation for NAND based storage. In some cases you may have start experiencing files corruption. And corruption of the file with a password hashes can lead to a problem you are observing.
Could you please post output of ubinfo /dev/ubi0 command?
It would be interesting to know more about your setup. What SoM are you using and what carrier board?
Furthermore, if you’re willing to share more about your project we can help you even more.
Now, are you able to enter root by going through another user by using sudo? The large file you found under /var/logs/btmp, is actually used to log failed login attempts. It should not be an issue to clear this file.
To get further information you can also look at the file /var/log/auth.log, there you might find the reason why the login fails.
I have below board:
Col VF50 128MB V1.2A + Iris Rev 1.1 Board + image Colibri-VF_Console-Image 2.8b6.184 20190401
My project is simply: This board is used to receive the reverse SSH command and control remote board. (There are others Vol VF50 send reverse SSH command). I think that’s why the file /var/logs/btmp is big. I can’t remove (rm /var/logs/btmp) this file, because it asks root permission.
I have already this issue before. The first time when I have this issue, I reflashed the image. It works. But this time I’d like to resolve this problem.
When I use the sudo command with the second user, I have the message -sh: sudo: not found
I try su command. but it asks me for the password. I try several password but it doesn’t work
I don’t have the file /var/log/auth.log. In the var/log, I have only below file or folder:
btmp, journal, lastlog, postinstall.log, wtmp, xferlog
Yes the disk space is about 95%. I try to remove some thing. The problem is I can’t remove the /var/logs/btmp file.
-rw------- 1 root utmp 120996864 Feb 22 14:56 btmp
When I use “ubinfo /dev/ubi0”, I have message -sh: ubinfo: not found
More detail:
After I login with the second user, I have a message below: [ 87.716643] systemd-journald[95]: File /var/log/journal/a1f9c4f585494a1b83c2c5f60bb611b4/user-1000.journal corrupted or uncleanly shut down, renaming and replacing.
-sh: .: line 27: can’t open ‘/etc/profile.d/utf8.sh’
it seems to me that both directories with root privileges are missing.
Try to add them to the path by executing the command export PATH=/usr/sbin:/sbin/:$PATH.
This is only a temporary change. If this gives you access to root, you can add the command to the ./bash.rc file, to make the change permanent. You do this by entering nano ~./bashrc and adding the export command above to the file.
I try to entry export PATH=/usr/local/sbin:/usr/sbin:/sbin/:$PATH (I see /usr/local/sbin in other VF50 board )
I have below PATH with echo $PATH command.
/usr/local/sbin:/usr/sbin:/sbin/:/usr/local/bin:/usr/bin:/bin
I can’t enter root user by “sudo” command. => -sh: sudo: not found
I try to add the export PATH command in the bash.rc. with “vi ~./bash.rc”. When I want to save the file, I have a message error, bash.rc doesn’t exist. So I can’t save it.
Now I can have the “ubinfo /dev/ubi0” like below:
ubi0
Volumes count: 3
Logical eraseblock size: 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks: 1002 (127229952 bytes, 121.3 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes 128
Count of bad physical eraseblocks: 6
Count of reserved physical eraseblocks: 14
Current maximum erase counter value: 2481
Minimum input/output unit size: 2048 bytes
Character device major/minor: 247:0
Present volumes: 0, 1, 2
Form your ubinfo /dev/ubi0 output - Amount of available logical eraseblocks: 0
It means your system can not be run normally anymore. You should always keep free at least 20% of you storage space.
If your able to do so, I would suggest you try first to free up space on your device. Only if you are not able to do so, the next step would be to reflash the board.
After successfully reflashing, I suggest tracking which application is filling up your disk space.