Thanks Radim for taking the time on this.
please see attachment for /etc/passwd & /etc/shadow. I firstly changed
the root user's password from no password to 'abc' and then added a new
user "factory" with password 'cba'. and start the su command.
the action list I did are given blow:
//1) ssh into the system with root
dropbear ssh server started
********************************
Hi root,
You are in chroot jail now ...
eth0 with IP=10.211.190.192
root@chroot ~# passwd
Changing password for root
New password:
Retype password:
Password for root changed by root
root@chroot ~# adduser factory
adduser: user 'factory' in use
root@chroot ~# deluser factory
root@chroot ~# adduser factory
Changing password for factory
New password:
Retype password:
Password for factory changed by root
root@chroot ~# chmod +s /bin/su.shadow
root@chroot ~#
//2) ssh as factory
damien@DH-ubt14:~$ ssh [email protected]
[email protected]'s password:
localhost:~$ su
Password:
setgid: Operation not permitted //why it is different error? last time is "su: Authentication failure"
localhost:~$
Would the problem be with chroot? the yocto environment that I ssh into
actually is a chroot environment within an Android system, could the su
command actually tries to switch to android's root user rather than the
chrooted yocto root user? There is definitely something weird, because
when I ssh into it, I use the password of yocto root not the Android root.
Cheers,