0

I added a new user in system:

$ useradd new_user

When I try to switch from root to new_user, I get this error:

$ su new_user
permission denied /bin/sh
$grep new_user /etc/passwd
new_user:x:2001:4001::/home/new_user:/bin/sh
$/bin/ls -ld /bin
dr-xr-xr-x    2 root     root          4096 Jan  1 00:07 /bin
$/bin/ls -ld /bin/sh
lrwxrwxrwx    1 root     root            20 Jan  1 00:07 /bin/sh -> /etc/alternatives/sh
$/bin/ls -ld /etc/alternatives/sh
lrwxrwxrwx    1 root     root             9 Jan  1 00:07 /etc/alternatives/sh -> /bin/bash
$/bin/ls -ld /bin/bash
-r-xr-x---    1 root     shell       700076 May 27  2014 /bin/bash
4
  • 3
    This may belong on the superuser stack exchange website. Jun 6, 2014 at 17:40
  • 1
    What system are you on? How did you switch to the new user? su newuser? Does your user appear in /etc/passwd?
    – Bruno9779
    Jun 6, 2014 at 17:51
  • Also, please use backticks for in-line terminal formatting; it makes things much easier to read.
    – HalosGhost
    Jun 6, 2014 at 17:51
  • 1
    Please edit your question to include (a) the result of grep new_user /etc/passwd, (b) the result of /bin/ls -ld /bin, and (c) the result of /bin/ls -l /bin/sh.
    – dg99
    Jun 6, 2014 at 18:42

0

You must log in to answer this question.