LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Managing(adding/deleting,etc) users in a squashfs(RO file system) with a small R/W partition (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/managing-adding-deleting-etc-users-in-a-squashfs-ro-file-system-with-a-small-r-w-partition-4175561743/)

abhishek046 12-18-2015 12:51 AM

Managing(adding/deleting,etc) users in a squashfs(RO file system) with a small R/W partition
 
I'm using squashfs as the file system on a board which is RO, along with a small jffs2 partition which is R/W. The files corresponding to user management, i.e /etc/passwd, /etc/group & /etc/shadow are all located on the RO partition. Now, there's no way a user may add, delete or modify his credentials using commands such as useradd, usermod,etc.
I'm looking for a way to provide user management options in this system (maybe by using the jffs2 partion?). I'm aware of 2 possible solutions-

1. Move the etc/{passwd,group,shadow} files to the R/W partition & symlink them to the RO partion.
2. Bind mount these files with their respective copies in on the R/W partion.

The problem with solution 1 is that commands like useradd don't accept symlinks & even if they do(by modifying their source) I'm not sure how either solution will be able to edit the /home/{username} directory while adding/deleting/modifying the home directory name as it's RO.

Squashfs is commonly used for small & embedded systems, so what exactly is the solution that is preferred for such scenarios?


All times are GMT -5. The time now is 04:30 PM.