Example:
#create "abc" group and group id is 100.
groupadd -g 100 abc
#create "tempuser" with user id 10000(-u), group id 100(-g), home directory /export/home/tempuser(-d), create directory if not exist(-m), shell(-s), comment(-c).
useradd -u 10000 -g 100 -d /export/home/tempuser -m -s /bin/ksh -c "Temp User" tempuser
Thanks tikual! Thats what I needed. After I created the user I su to that user and checked which directory I was in and it wasn't the directory I specified with -d command. Why? How can I now set a password for this user?
First, make sure the directory not owned by other user. Second, make sure the option -m has been provided. Third, for us more easy to help you. Let us know what you have typed.
Last, change password not related to user home directory. As dragon's say, use 'passwd' to change it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.