Announcement

Collapse
No announcement yet.

How can I customise the folders created when a new user is added? [Solved]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How can I customise the folders created when a new user is added? [Solved]

    I have done some looking to try to find where the adduser gets it's template for folder creation when a new user is added.
    So far I have drawn a blank.
    I have noticed that the home directory is not actually created until the new user logs in.

    I am wanting to add some directories (preferably as symbolic links) to the home creation process to save me having to add these manually after the users are created.
    This is for use on my media server.

    Does anyone know where the configuration files are located that specify what goes into the new users home directory?
    You don't need a license to drive a sandwich.

    #2
    Re: How can I customise the folders created when a new user is added?

    Originally posted by man adduser
    . . .
    DESCRIPTION
    adduser and addgroup add users and groups to the system according to
    command line options and configuration information in
    /etc/adduser.conf.
    . . .
    Originally posted by man adduser.conf
    adduser.conf(5) adduser.conf(5)

    NAME
    /etc/adduser.conf - configuration file for adduser(8 ) and addgroup(8 ).

    DESCRIPTION
    The file /etc/adduser.conf contains defaults for the programs adduser(8 ) , addgroup(8 ) , deluser(8 ) and delgroup(8 ). Each line holds a single value pair in the form
    option = value. Double or single quotes are allowed around the value, as is whitespace around the equals sign. Comment lines must have a hash sign (# ) in the first col‐
    umn.
    . . .
    I think you can add your symlinks to /etc/skel and adduser should honor them with all subsequently created users. I've never actually tried this though.

    For documentation and examples please see /usr/share/doc/adduser/examples.
    Welcome newbies!
    Verify the ISO
    Kubuntu's documentation

    Comment


      #3
      Re: How can I customise the folders created when a new user is added?

      > Freedesktop.org / xdg-user-dirs
      xdg-user-dirs

      xdg-user-dirs is a tool to help manage "well known" user directories like the desktop folder and the music folder. It also handles localization (i.e. translation) of the filenames.

      The way it works is that xdg-user-dirs-update is run very early in the login phase. This program reads a configuration file, and a set of default directories. It then creates localized versions of these directories in the users home directory and sets up a config file in $(XDG_CONFIG_HOME)/user-dirs.dirs (XDG_CONFIG_HOME defaults to ~/.config) that applications can read to find these directories...
      => Config files:
      /etc/xdg/user-dirs.conf
      ~/.config/user-dirs.dirs


      Kubuntu has been using the xdg-user-dirs from the Hardy > New directories / Freedesktop / KDE 3 /KDE 4
      Before you edit, BACKUP !

      Why there are dead links ?
      1. Thread: Please explain how to access old kubuntu forum posts
      2. Thread: Lost Information

      Comment


        #4
        Re: How can I customise the folders created when a new user is added?

        In the olden days the contents of /etc/skel used to be taken as the blueprint for what the new users sees in his/her ~

        Don't tell me it has changed!?
        Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

        Comment


          #5
          Re: How can I customise the folders created when a new user is added?

          Originally posted by toad
          In the olden days the contents of /etc/skel used to be taken as the blueprint for what the new users sees in his/her ~

          Don't tell me it has changed!?
          It hasn't, /etc/skel is still used

          But there are other (optional) tools/configs that can affect user directories, like 'xdg-user-dirs' package that rog mentioned

          Comment


            #6
            Re: How can I customise the folders created when a new user is added? [Solved]

            Thanks all for the information.
            I guess this was a bit of a left field question, but it has been hard to find any information that was helpful.
            You don't need a license to drive a sandwich.

            Comment


              #7
              Re: How can I customise the folders created when a new user is added?

              Originally posted by Rog131
              Wow! The command is on my system, but I can't find any documentation for it.

              Thanks for pointing this out, Rog131. I guess I need to read up on the new ways of doing things.
              Welcome newbies!
              Verify the ISO
              Kubuntu's documentation

              Comment

              Working...
              X