Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 25th September 2012, 12:27 PM
anishjp's Avatar
anishjp Offline
Registered User
 
Join Date: Sep 2009
Location: Johannesburg, South Africa
Posts: 215
windows_7firefox
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
Attached Thumbnails
Click image for larger version

Name:	useradd.PNG
Views:	34
Size:	57.6 KB
ID:	23800  
__________________
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
Reply With Quote
  #2  
Old 25th September 2012, 01:11 PM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 1,718
linuxfirefox
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.
Reply With Quote
  #3  
Old 25th September 2012, 01:22 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,092
linuxfirefox
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.
Reply With Quote
  #4  
Old 25th September 2012, 01:28 PM
flyingfsck Offline
Registered User
 
Join Date: Aug 2010
Location: Al Ain, UAE
Posts: 1,046
linuxfirefox
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.
Reply With Quote
  #5  
Old 25th September 2012, 01:53 PM
PabloEsc's Avatar
PabloEsc Offline
Registered User
 
Join Date: Apr 2010
Location: Poznan, Poland
Age: 33
Posts: 58
windows_xp_2003firefox
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.
Reply With Quote
  #6  
Old 25th September 2012, 08:01 PM
anishjp's Avatar
anishjp Offline
Registered User
 
Join Date: Sep 2009
Location: Johannesburg, South Africa
Posts: 215
linuxfirefox
Re: Directories like Desktop,Documents,Downloads not created under user's directory

Quote:
Originally Posted by jpollard View Post
Those missing directories depend on what desktop environment the user chooses.
I use Gnome!
Quote:
Originally Posted by jpollard View Post
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 View Post
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 View Post
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
Reply With Quote
Reply

Tags
created, desktop, directories, directory, documents, downloads, user, useradd

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New created directories not showing in Places (folders) linwalker Using Fedora 1 3rd December 2010 08:39 PM
why two hard links are created when a directory is created?? pushparaj_bits Programming & Packaging 3 23rd October 2009 04:45 AM
Login! if I haven't created yet any user's. Fedora 10. hph Installation and Live Media 3 26th May 2009 07:01 AM
Apache & Serving web pages from user's home directories TheOlster Servers & Networking 2 10th May 2006 11:53 AM
Serve web pages from user's home directories? Taae Servers & Networking 14 13th April 2006 03:08 PM


Current GMT-time: 22:19 (Saturday, 18-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat