I have problem to set path when creating a new user.
I need to create a user "newuser" and set path to /opt/sd/../sdshell
But as root, when I try to create the new user with above path, I get error:
# useradd -d /usr2/newuser -g adm -s /opt/sd/ace/prog/sdshell test2
UX: useradd: ERROR: /opt/sd/ace/prog/sdshell is not a valid shell. Choose another.
(The command # useradd -d /usr2/newuser -g adm -s /bin/sh
works without error)
The above shell (/opt/sd/ace/prog/sdshell)
is valid, because there are existing
users whose path point to that shell:
# cat /etc/passwd
root:x:0:1:Super-User:/:/b
in/ksh
daemon:x:1:1::/:
bin:x:2:2::/usr/bin:
sys:x:3:3::/:
adm:x:4:4:Admin:/var/adm:
.
.
.
tom:x:104:1:Tom Tom:/usr2/tom:/opt/sd/prog
/sdshell
.
.
Above user (tom) can login without any problem or errors.
And here is the shell location:
# ls -l /opt/sd/prog/sdshell
---s--x--x 1 root other 95508 Oct 29 1996 /opt/sd/ace/prog/sdshell
How can I fix this?
Thanks.
-tooki
Start Free Trial