[Buildroot] help - custom user not working
Giulio Benetti
giulio.benetti at benettiengineering.com
Fri Dec 8 11:29:05 UTC 2023
Hi Stefano,
On 08/12/23 11:45, Stefano Cottafavi wrote:
> Hi,
> I'm trying to add a custom user to the minimal "raspberrypi4_defconfig"
> build.
> I'm using Buildroot 2023.11, following the manual I've created a
> "users.txt" file (in the buildroot root folder) with just one line:
>
> pi -1 pi -1 =raspberry /home/pi /bin/sh -
>
> The config file contains:
>
> BR2_ROOTFS_USERS_TABLES="users.txt"
>
> The build is successful and looking and the "full_users_table.txt"
> (output of the build) I can see the user definition above.
>
> However, when I try to log on as "pi" I get "Login incorrect" error.
>
> If I login as root and check the /etc/psswd, I DO NOT see the user pi
>
> Can you help me understand what am I missing?
I've build reproduced here what you've described and in
rootfs.tar/etc/passwd
I correctly find:
pi:x:100:101::/home/pi:/bin/sh
Since it builds correctly it means it finds users.txt file in Buildroot
root folder, so everything looks good to me.
I suggest you to check rootfs.tar archive for the final target rootfs.
This is because target/ folder doesn't contain the complete final rootfs
files, for example it misses pi user in target/etc/passwd file.
--
Giulio Benetti
CEO&CTO at Benetti Engineering sas
More information about the buildroot
mailing list