AlmaLinux / raspberry-pi

AlmaLinux Raspberry Pi
122 stars 17 forks source link

After installation, there is no "almalinux" account in the system, so I cannot log in. #42

Closed wf58585858 closed 3 months ago

wf58585858 commented 3 months ago

When you boot your Raspberry Pi, you can log in with the username "almalinux" and the password "almalinux". The root account is locked by default. Proceed with resizing your root filesystem by running "sudo rootfs-expand".

I used the RPi Image to write the downloaded image to the TF card. I tested both versions 8 and 9. After installation, using "almalinux" as the username does not allow me to log in. Then I used the RPi Image to rewrite the image to the TF card, choosing the option to add a new user. After starting the device, I could log in using the newly added account, but I couldn't switch to root using the "su root" command. It prompted:

[hello@localhost ~]$ su - root
Password:
su: Authentication failure

Then I checked by using "cat /etc/passwd":

[hello@localhost ~]$ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin
systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
tss:x:59:59:Account used for TPM access:/:/sbin/nologin
sssd:x:998:995:User for sssd:/:/sbin/nologin
chrony:x:997:994:chrony system user:/var/lib/chrony:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/usr/share/empty.sshd:/sbin/nologin
systemd-oom:x:992:992:systemd Userspace OOM Killer:/:/usr/sbin/nologin
hello:x:1000:1006::/home/hello:/bin/bash

It seems that there is no "almalinux" account at all. What might be the issue at this point, and how can I switch to root login?

metalefty commented 3 months ago

What is your image?

metalefty commented 3 months ago

choosing the option to add a new user

I don't understand the option you are talking about. The user is automatically created and there is no option to choose. I guess the image you're using is not our official image.

metalefty commented 3 months ago

I used the RPi Image to write the downloaded image to the TF card.

Ah I see, probably you meant RPi Imager , it ends with lowercase R. and you're using it. I didn't notice that because RPi Image ends with E means a Raspberry Pi Image, not a tool.

We don't support "OS customization" feature of Raspberry Pi Imager. Just write the downloaded image as-is, with no customizations. Then the default almalinux user will be created during the first boot process by cloud-init.

If you would like to make a custom configuration, follow our official way.

wf58585858 commented 3 months ago

I used the RPi Image to write the downloaded image to the TF card.

Ah I see, probably you meant RPi Imager , it ends with lowercase R. and you're using it. I didn't notice that because RPi Image ends with E means a Raspberry Pi Image, not a tool.

We don't support "OS customization" feature of Raspberry Pi Imager. Just write the downloaded image as-is, with no customizations. Then the default almalinux user will be created during the first boot process by cloud-init.

If you would like to make a custom configuration, follow our official way.

20240327191451

The current situation is as follows: I followed the steps outlined on your official website without customizing any users. During the login process, I received an error message indicating that the voltage might be too low, despite using a 5V3A power supply. The cable connecting to the Raspberry Pi is relatively long, which could result in voltage drop. Could this error be caused by this issue?

metalefty commented 3 months ago

No, it is your hardware issue. Try another power supply.

wf58585858 commented 3 months ago

The issue has been resolved. It turned out that it was not related to voltage or the device itself. When I was using the PI Imager to create the system, even though I didn't choose to add a custom user, I did set the default time zone, which caused the problem. Perhaps you could add a tip on the official website documentation to avoid this issue.

Now I have another question to ask. When setting a static IP, I found that there is no /etc/dhcpcd.conf file. I know I can use nmcli to set a static IP, but I wanted to ask, what is the best practice for setting a static IP in this system?

metalefty commented 3 months ago

Sure, thanks for reporting. Good find.

Regarding static IP configuration, there is no specific way I personally recommend. Whichever is fine if it works.

metalefty commented 3 months ago

Closing, the main issue is solved.