From: Pedro P. V. <ped...@se...> - 2017-04-27 11:45:58
|
Hello, I have a problem using multiple users on a system embedded with rootfs based on squashfs. In the user database (/etc/passwd and /etc/shadow files) the following users are correctly configured: root with uid=0 user1 with uid=101 user2 with uid=102 The squashfs file system is created from the tmp_dir directory, which contains the root file system of the embedded system: sudo chown 101 tmp_dir sudo mksquashfs4.0 tmp_dir squashfs.img -noappend -no-recovery At system startup, the squashfs image is mounted and becomes the root file system: mount squashfs.img /new_root -o ro,loop cd /new_root mkdir -p old_root pivot_root . old_root exec chroot . /linuxrc I enter the system and execute: # su user1 And everything is OK. But if I execute: # su user2 Returns the following error: su: can't execute '/bin/bash': Permission denied Si al crear el sistema de ficheros se hace: And if the file system is created in this way (only change the owner of the tmp_dir directory): sudo chown 102 tmp_dir sudo mksquashfs4.0 tmp_dir squashfs.img -noappend -no-recover I enter the system and execute: # su user1 Returns the following error: su: can't execute '/bin/bash': Permission denied But if I execute: # su user2 And everything is OK. Anyone know how to use multiple users in squashfs? Thank you in advance. Regards, Pedro |