i.mx6q yocto linux 3.10.17-- login as root,but get "permission denied (are you root?)" while ping

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.mx6q yocto linux 3.10.17-- login as root,but get "permission denied (are you root?)" while ping

Jump to solution
3,146 Views
bennyhuang
Contributor I

using yocto project linux 3.10.17 and imx6q-sabresd,compiling with the default options.system boot properly.but while i login as root,some commands work wrong

eg.

while pinging the gateway,

root@imx6qsabresd:~# ping 192.168.1.1

PING 192.168.1.1 (192.168.1.1): 56 data bytes

ping: permission denied (are you root?)

while reboot

root@imx6qsabresd:~# reboot

reboot: must be superuser.

the file /etc/passwd & /etc/shadow seem properly

/etc/passwd:

root:x:0:0:root:/home/root:/bin/sh

daemon:x:1:1:daemon:/usr/sbin:/bin/sh

bin:x:2:2:bin:/bin:/bin/sh

sys:x:3:3:sys:/dev:/bin/sh

sync:x:4:65534:sync:/bin:/bin/sync

games:x:5:60:games:/usr/games:/bin/sh

man:x:6:12:man:/var/cache/man:/bin/sh

lp:x:7:7:lp:/var/spool/lpd:/bin/sh

mail:x:8:8:mail:/var/mail:/bin/sh

news:x:9:9:news:/var/spool/news:/bin/sh

uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh

proxy:x:13:13:proxy:/bin:/bin/sh

www-data:x:33:33:www-data:/var/www:/bin/sh

backup:x:34:34:backup:/var/backups:/bin/sh

list:x:38:38:Mailing List Manager:/var/list:/bin/sh

irc:x:39:39:ircd:/var/run/ircd:/bin/sh

gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh

nobody:x:65534:65534:nobody:/nonexistent:/bin/sh

avahi:x:999:999::/var/run/avahi-daemon:/bin/false

avahi-autoipd:x:998:998:Avahi autoip daemon:/var/run/avahi-autoipd:/bin/false

messagebus:x:997:996::/var/lib/dbus:/bin/false

sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin

/etc/shadow:

root:EviqnrSjkYCoE:16686:0:99999:7:::

daemon:*:16686:0:99999:7:::

bin:*:16686:0:99999:7:::

sys:*:16686:0:99999:7:::

sync:*:16686:0:99999:7:::

games:*:16686:0:99999:7:::

man:*:16686:0:99999:7:::

lp:*:16686:0:99999:7:::

mail:*:16686:0:99999:7:::

news:*:16686:0:99999:7:::

uucp:*:16686:0:99999:7:::

proxy:*:16686:0:99999:7:::

www-data:*:16686:0:99999:7:::

backup:*:16686:0:99999:7:::

list:*:16686:0:99999:7:::

irc:*:16686:0:99999:7:::

gnats:*:16686:0:99999:7:::

nobody:*:16686:0:99999:7:::

avahi:!:16686::::::

avahi-autoipd:!:16686::::::

messagebus:!:16686::::::

how can I solve it?

thanks!

Labels (3)
Tags (2)
0 Kudos
Reply
1 Solution
1,941 Views
bennyhuang
Contributor I

I finally fixes this problem.

chown root:root /bin/busybox.suid

View solution in original post

0 Kudos
Reply
3 Replies
1,942 Views
bennyhuang
Contributor I

I finally fixes this problem.

chown root:root /bin/busybox.suid

0 Kudos
Reply
1,941 Views
vijayaragavansr
Contributor II

Hi benny huang,

that did not work for me. 

below my terminal log

root@hello:~# chown root:root /bin/busybox.suid
chown: /bin/busybox.suid: Operation not permitted
root@hello:~# su
initgroups: Operation not permitted
root@hello:~#

Thanks

vijay

0 Kudos
Reply
1,941 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Vijayaragavan Srinivasan,

It's odd that the command is not working. I tried it and was successful on the fsl-image-gui image from the L4.1.15 BSP. It's odd that you don't have privileges to do this.  I have also tried with core-image-base from the same BSP Release and it worked as well.

Have you tried adding an extra user with root access?

inherit extrausers
EXTRA_USERS_PARAMS = "usermod -P password root;"

Regards,

0 Kudos
Reply