changing root password on readonly rootfs

Marek Belisko


I'm trying to add support for changing root pwd on systemd built by
yocto (using kirkstone branch).
I enabled chpasswd + passwd applets from busybox but they don't work
as the path is readonly. I symliked /etc/passwd and /etc.shadow to a
writable partition and it seems to work. Other problem is I have samba
enabled where pam is a required feature and after password change and
logout pam asks for changing password again.

I've tried to use usermod on target (same way as on build) but shadow
seems to create lock files on readonly and it also fails.

Another idea I had is to use overlayfs for complete /ect directory but
I'm not sure if this is the way to go.

Any suggestions?

Thanks and BR,


as simple and primitive as possible
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra