 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

25th September 2012, 12:27 PM
|
 |
Registered User
|
|
Join Date: Sep 2009
Location: Johannesburg, South Africa
Posts: 215

|
|
|
Directories like Desktop,Documents,Downloads not created under user's directory
Hi guys
I created a user from the terminal as shown in the picture. I see that the user's (anju) home directory was created but other directories such as Desktop, Documents, Downloads etc were not created! If I log in as anju using gui, it creates all the directories automatically and l can access them from the terminal as well. What should I do, if I want all the directories to be created automaticaly under the users home directory when I create the user from the terminal using useradd command?
Regard,
Anish
__________________
Host Machine
OS: Fedora 18, Desktop: Gnome, Kernel: 3.7.2.fc18.x86_64, Processor: Intel i3-2100 @ 3.10GHz, RAM: 8GB
Motherboard: ASUS P8H61-M LE/USB3, Display: Benq 1280x1024, Graphics: ATI Radeon HD 5450
|

25th September 2012, 01:11 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,718

|
|
|
Re: Directories like Desktop,Documents,Downloads not created under user's directory
The -m options of useradd only creates an empty home directory for the new user.
All other directories are entirely optional and will be created when needed like you said.
How many users do you want to add to your system?
Code:
-k, --skel SKEL_DIR
The skeleton directory, which contains files and directories to be
copied in the user's home directory, when the home directory is
created by useradd.
This option is only valid if the -m (or --create-home) option is
specified.
If this option is not set, the skeleton directory is defined by the
SKEL variable in /etc/default/useradd or, by default, /etc/skel.
|

25th September 2012, 01:22 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,092

|
|
|
Re: Directories like Desktop,Documents,Downloads not created under user's directory
Those missing directories depend on what desktop environment the user chooses.
None apply to all cases... Creating them when the account is created is just a waste.
|

25th September 2012, 01:28 PM
|
|
Registered User
|
|
Join Date: Aug 2010
Location: Al Ain, UAE
Posts: 1,046

|
|
|
Re: Directories like Desktop,Documents,Downloads not created under user's directory
You could put things you want to be added to a user home dir in /etc/skel. That includes directories, desktop widgets and more. Whatever you put there, will be replicated.
|

25th September 2012, 01:53 PM
|
 |
Registered User
|
|
Join Date: Apr 2010
Location: Poznan, Poland
Age: 33
Posts: 58

|
|
|
Re: Directories like Desktop,Documents,Downloads not created under user's directory
Be sure to check if You have xdg-user-dirs-gtk and xdg-user-dirs installed.
|

25th September 2012, 08:01 PM
|
 |
Registered User
|
|
Join Date: Sep 2009
Location: Johannesburg, South Africa
Posts: 215

|
|
|
Re: Directories like Desktop,Documents,Downloads not created under user's directory
Quote:
Originally Posted by jpollard
Those missing directories depend on what desktop environment the user chooses.
|
I use Gnome!
Quote:
Originally Posted by jpollard
Creating them when the account is created is just a waste.
|
Ofcourse! I just want to know if it can be created by default from the terminal!
---------- Post added at 09:01 PM ---------- Previous post was at 08:47 PM ----------
Quote:
Originally Posted by george_toolan
The -m options of useradd only creates an empty home directory for the new user.
All other directories are entirely optional and will be created when needed like you said.
How many users do you want to add to your system?
|
I just want to see, If all those standard directories can be created under the user's home directory using 1 or 2 commands instead of login as that user via gui!
[
Quote:
Originally Posted by george_toolan
CODE] -k, --skel SKEL_DIR
The skeleton directory, which contains files and directories to be
copied in the user's home directory, when the home directory is
created by useradd.
This option is only valid if the -m (or --create-home) option is
specified.
If this option is not set, the skeleton directory is defined by the
SKEL variable in /etc/default/useradd or, by default, /etc/skel.[/CODE]
|
Code:
[root@desktop ~]# cat /etc/default/useradd
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes
Code:
[root@desktop ~]# ll /etc/skel/.
./ ../ .bash_logout .bash_profile .bashrc .gnome2/ .mozilla/
I dont see a file named skel but there is a directory named skel
__________________
Host Machine
OS: Fedora 18, Desktop: Gnome, Kernel: 3.7.2.fc18.x86_64, Processor: Intel i3-2100 @ 3.10GHz, RAM: 8GB
Motherboard: ASUS P8H61-M LE/USB3, Display: Benq 1280x1024, Graphics: ATI Radeon HD 5450
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 22:19 (Saturday, 18-05-2013)
|
|
 |
 |
 |
 |
|
|