This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TDA2EXEVM: username create fails

Part Number: TDA2EXEVM

Tool/software: Linux

Hi,


we are using tda2ex evm. SDK ver: vision SDK 2.12

We want to create user, is giving following error

root@dra7xx-evm:~# adduser mcc
adduser: warning: can't lock '/etc/passwd': Permission denied
adduser: warning: can't lock '/etc/shadow': Permission denied
addgroup: warning: can't lock '/etc/group': Permission denied
addgroup: warning: can't lock '/etc/gshadow': Permission denied
Enter new UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged

Regards,

RAJ M

  • Hello RAJ,

    Check this thread.

    Best regards,
    Kemal

  • Hi,

    We changed the file permission as per the link, but getting same error as below.



    root@dra7xx-evm:/# ls -al /etc/securetty
    -rw-r--r-- 1 root root 1902 Oct 23 16:24 /etc/securetty
    root@dra7xx-evm:/# ls -al /etc/passwd
    -rw-r--r-- 1 root root 1199 Oct 23 2016 /etc/passwd
    root@dra7xx-evm:/# ls -al /etc/shadow
    -rw-r--r-- 1 root root 815 Oct 23 2016 /etc/shadow



    #adduser mcc
    adduser: warning: can't lock '/etc/passwd': Permission denied
    adduser: warning: can't lock '/etc/shadow': Permission denied
    addgroup: warning: can't lock '/etc/group': Permission denied
    addgroup: warning: can't lock '/etc/gshadow': Permission denied
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: Authentication token manipulation error
    passwd: password unchanged

    Regards,
    RAJ M
  • Can you post the feedback from these commands and attach the adduser.log.* logs?
    root@dra7xx-evm:/# id
    root@dra7xx-evm:/# ls -al /etc/*.lock
    root@dra7xx-evm:/# cp /etc/passwd /etc/passwd.test
    root@dra7xx-evm:/# mount
    root@dra7xx-evm:/# strace -o /home/root/adduser.log -ff useradd mmc

  • Hi,

    root@dra7xx-evm:~# id

    uid=0(root) gid=0(root) groups=0(root)

    root@dra7xx-evm:~#

    root@dra7xx-evm:~#

    root@dra7xx-evm:~#  ls -al /etc/*.lock

    ls: /etc/*.lock: No such file or directory

    root@dra7xx-evm:~#

    root@dra7xx-evm:~#

    root@dra7xx-evm:~# cp /etc/passwd /etc/passwd.test

    root@dra7xx-evm:~#  mount

    /dev/mmcblk0p2 on / type ext4 (rw,relatime,data=ordered)

    devtmpfs on /dev type devtmpfs (rw,relatime,size=246916k,nr_inodes=61729,mode=755)

    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

    proc on /proc type proc (rw,relatime)

    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

    devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)

    tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)

    tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)

    cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-a)

    cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)

    cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)

    cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)

    cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)

    cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)

    cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)

    cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)

    cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)

    tmpfs on /tmp type tmpfs (rw)

    debugfs on /sys/kernel/debug type debugfs (rw,relatime)

    mqueue on /dev/mqueue type mqueue (rw,relatime)

    tmpfs on /media/ram type tmpfs (rw,relatime,size=16384k)

    tmpfs on /var/volatile type tmpfs (rw,relatime,size=51200k)

    tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=69896k,mode=700)

    root@dra7xx-evm:~#

    root@dra7xx-evm:~#

    root@dra7xx-evm:~#  strace -o /home/root/adduser.log -ff useradd mmc

    useradd: cannot lock /etc/passwd; try again later.

    7380.adduser.log

  • The Permission denied you get is over the /etc/.pwd.lock.

    open("/etc/.pwd.lock", O_WRONLY|O_CREAT|O_CLOEXEC, 0600) = 3
    rt_sigaction(SIGALRM, {0xb6f064bd, ~[], SA_RESTORER, 0xb6e940a1}, {SIG_DFL, [], 0}, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [ALRM], [], 8) = 0
    setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={15, 0}}, {it_interval={0, 0}, it_value={0, 0}}) = 0
    fcntl64(3, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = -1 EACCES (Permission denied)
    setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, {it_interval={0, 0}, it_value={14, 999721}}) = 0
    rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    rt_sigaction(SIGALRM, {SIG_DFL, [], SA_RESTORER, 0xb6e940a1}, NULL, 8) = 0

    Can you delete /etc/.pwd.lock then retry?
    Can you also post the feedback from command below to see which adduser program is invoked?
    root@dra7xx-evm:~# ls -al `which adduser`

  • Hi,

    1. Can you delete /etc/.pwd.lock then retry?

    No luck, same issue.

    #ls -al `which adduser`
    lrwxrwxrwx 1 1003 1003 19 Jun 26 10:38 /usr/sbin/adduser -> /bin/busybox.nosuid

    Regards,
    RAJ M
  • Try to remount the root partition.
    root@dra7xx-evm:~# mount -o remount,rw /

    Have you reflashed the whole system?
  • Hi,

    root@dra7xx-evm:~# mount -o remount,rw /
    EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    root@dra7xx-evm:~# mount
    /dev/mmcblk0p2 on / type ext4 (rw,relatime,data=ordered)
    devtmpfs on /dev type devtmpfs (rw,relatime,size=248204k,nr_inodes=62051,mode=755)
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    proc on /proc type proc (rw,relatime)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
    tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
    tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
    cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-)
    cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
    cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
    cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
    cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
    cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
    cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
    cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
    cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
    debugfs on /sys/kernel/debug type debugfs (rw,relatime)



    root@dra7xx-evm:~# adduser new
    adduser: warning: can't lock '/etc/passwd': Permission denied
    adduser: warning: can't lock '/etc/shadow': Permission denied
    addgroup: warning: can't lock '/etc/group': Permission denied
    addgroup: warning: can't lock '/etc/gshadow': Permission denied
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: Authentication token manipulation error
    passwd: password unchanged
  • Something is wiped out on your system. Have you tried to add user on fresh installed system or different board?

  • Hi,

    We are tried TDA2EX evm both SD and eMMC similar issue occurs.

    Regards,
    RAJ M
  • Have you tried to use the useradd command?

  • Hi,

    root@dra7xx-evm:/opt/dvr/bin# useradd raj
    useradd: cannot lock /etc/passwd; try again later.
  • Can you post the output of groups command and attach your /usr/sbin/useradd program?

  • Hi,

    root@dra7xx-evm:~# groups

    root

    I cant add binary. I used below file system which is downloaded below link

    downloads.ti.com/infotainment/esd/jacinto6/processor-sdk-linux-automotive/03_02_00_03/exports/tisdk-rootfs-image-dra7xx-evm.tar.xz