1848517 Members
4470 Online
104031 Solutions
New Discussion

create an user

 
SOLVED
Go to solution
kacou
Regular Advisor

create an user

I want to create a user kak in same but i have an error message. see below the process in sam and the error message.
.................................
* Required Field

*Login Name : kak________________

User ID : (X) Next Available ID
( ) Specify ID

Primary Group : users______________
[ Change Primary Group ]

Home Directory : /DT03______________
(default : /home/{login-name})

Create Home Directory : Yes ->

Start-Up Program Options : (X) Select Start-Up Program
( ) Specify Start-Up Program
Start-Up Program : /sbin/sh ->

Comments : ___________________
(Real Name, Location, Phone, Home Phone)


See the error message below

'/DT03' is not a valid directory
Command Unsuccessful
press enter Key to continue

however i already created some users in this directory.
8 REPLIES 8
Rasheed Tamton
Honored Contributor
Solution

Re: create an user

Is it /DT03 or /DTo3 (letter o). Is the path starting from / or from another dir.

Try on the command line:
useradd -d /DT03 kak

kacou
Regular Advisor

Re: create an user

it's the same error message!!!!
Rasheed Tamton
Honored Contributor

Re: create an user

You cannot give the same home dir to another use.

man useradd

Look for the -r option

By default, useradd will not recursively update the ownership of the home directory for the new user if the directory exists and is not a shared home directory

kacou
Regular Advisor

Re: create an user

see this the man page below. i don't understand. what the command exactly?


-r update_homedir_ownership
By default, useradd will not recursively update
the ownership of the home directory for the new
user if the directory exists and is not a shared
home directory. This behavior of useradd can be
changed using the -r [yes|no] option. When used
with the -D option, the -r option will set the
default behavior. The update_homedir_ownership
argument is either yes or no:

yes useradd will recursively update the
ownership of the home directory and the
files/directories below it to the new user,
if the directory already exists and is not a
shared home directory.

no useradd will not update the ownership of the
home directory and the files/directories
below it.
Jeeshan
Honored Contributor

Re: create an user

exactly, the above response is correct.

you didn't give same home directory to another user.but you can do an alternative like, you can create different directory as like as user, more likely

/DT03/x

/DT03/y

/DT03/z

.............

etc..........

and this way you didn't face any problem at all.
a warrior never quits
Sajjad Sahir
Honored Contributor

Re: create an user

Dear KAcau

useadd -m -d /home/kacau kacau

passwd kacau (for passwd)

do like this it will create kacau user with home directory /home/kacau same way u can do what ever u want

sajjad
Asif Sharif
Honored Contributor

Re: create an user

kacou
Regular Advisor

Re: create an user

thanks a lot!!!
i use the command below:
# useradd -m -i -d /DT03 kak