Results 1 to 4 of 4

Thread: Preventing adduser from creating additional folders in home directory

  1. #1
    Join Date
    Nov 2009
    Beans
    8

    Preventing adduser from creating additional folders in home directory

    I'm trying to set up a specific directory structure for each home folder whenever I add a new user. I have what I want in /etc/skel, but I'd also like to eliminate the Documents, Music, Pictures, etc. folders that Ubuntu automatically creates when a new user is added. Is there any way to do this? Where are these extra directories defined? I didn't see anything in the /etc/adduser.conf file--is there some additional script that is run whenever a new user is added?

  2. #2
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,452
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Preventing adduser from creating additional folders in home directory

    Quote Originally Posted by armandhr View Post
    I'm trying to set up a specific directory structure for each home folder whenever I add a new user. I have what I want in /etc/skel, but I'd also like to eliminate the Documents, Music, Pictures, etc. folders that Ubuntu automatically creates when a new user is added. Is there any way to do this? Where are these extra directories defined? I didn't see anything in the /etc/adduser.conf file--is there some additional script that is run whenever a new user is added?
    AFAIK they are default Gnome folders, automatically created at first login to Gnome by that user. They have nothing to do with the default Linux folders.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate.
    New to technical forums?: How To Ask Questions The Smart Way

  3. #3
    Join Date
    Nov 2009
    Beans
    8

    Re: Preventing adduser from creating additional folders in home directory

    Quote Originally Posted by dcstar View Post
    AFAIK they are default Gnome folders, automatically created at first login to Gnome by that user. They have nothing to do with the default Linux folders.
    Ah, that does make a lot more sense. So are they set via /etc/xdg or something? If I set "enabled=False" in /etc/xdg/user-dirs.conf, will that prevent these folders from being generated at the first session, or could I perhaps blank out the entries in /etc/xdg/user-dirs.defaults?

    Edit: Marking the thread as solved. Just in case anyone else has the same question, changing /etc/xdg/user-dirs.conf to "enabled=False" did indeed prevent these folders from being generated at the first login to Gnome. I am running Ubuntu 10.04.
    Last edited by armandhr; December 7th, 2010 at 06:17 AM. Reason: Follow-up data

  4. #4
    Join Date
    Jul 2007
    Beans
    2

    Re: Preventing adduser from creating additional folders in home directory

    Quote Originally Posted by armandhr View Post
    Ah, that does make a lot more sense. So are they set via /etc/xdg or something? If I set "enabled=False" in /etc/xdg/user-dirs.conf, will that prevent these folders from being generated at the first session, or could I perhaps blank out the entries in /etc/xdg/user-dirs.defaults?

    Edit: Marking the thread as solved. Just in case anyone else has the same question, changing /etc/xdg/user-dirs.conf to "enabled=False" did indeed prevent these folders from being generated at the first login to Gnome. I am running Ubuntu 10.04.
    As stated in the comments of /etc/xdg/user-dirs.conf

    Code:
    # You can also have per-user config in ~/.config/user-dirs.conf, or specify
    # the XDG_CONFIG_HOME and/or XDG_CONFIG_DIRS to override this
    More information can be found here:
    http://standards.freedesktop.org/bas...ec-latest.html

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •