You are not logged in.

#1 2008-06-22 21:25:38

Myav
Member
Registered: 2007-05-07
Posts: 58

useradd and --base-dir

According to the man page, I can use -b, --base-dir BASE_DIR as option to useradd. But this doesn't work:

> useradd -b /home -m test
[Here useradd prints the usage rules, saying thereby that the command was incorrectly formed]

Where is the mistake?

Thanks.

Offline

#2 2008-06-22 22:06:51

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: useradd and --base-dir

I think the '/home' is what causing your problem. Take it out probably.

Offline

#3 2008-06-22 22:21:53

Myav
Member
Registered: 2007-05-07
Posts: 58

Re: useradd and --base-dir

I can't use -b without path, so '/home' or something else is necessary. I changed '/home' to a custom dir, but it didn't help:

> sudo mkdir /tst
> sudo useradd -b /tst -m test
[ the same output ]

Offline

#4 2008-06-22 22:28:07

Vintendo
Member
From: Netherlands
Registered: 2008-04-21
Posts: 375
Website

Re: useradd and --base-dir

Try it without the -b function so just. I believe it takes /home/*USERNAME* as default.

useradd -m test

Offline

#5 2008-06-23 07:25:20

Myav
Member
Registered: 2007-05-07
Posts: 58

Re: useradd and --base-dir

Works fine without -b. I think this option can't be used in usual mode when adding an user (it is a bug in the man page). The only place for -b is on pair with -D:

useradd -D -b /some/dir

Offline

Board footer

Powered by FluxBB