[Buildroot] help - custom user not working

Michael Nazzareno Trimarchi michael at amarulasolutions.com
Fri Dec 8 11:30:46 UTC 2023


Hi Giulio

On Fri, Dec 8, 2023 at 12:29 PM Giulio Benetti
<giulio.benetti at benettiengineering.com> wrote:
>
> 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.
>

We replied at the same time. I have done the same and add more info to debug
it

> --
> Giulio Benetti
> CEO&CTO at Benetti Engineering sas
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael at amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info at amarulasolutions.com
www.amarulasolutions.com



More information about the buildroot mailing list