4

I am learning Red Hat Enterprise Linux 7. After creating users as root, if I login as the new user using "su - username", there are no directories in the user's home directory .

Once I login as the new user graphically, then these are created.

Why is this so?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Sunshine
  • 245
  • 1
  • 3
  • 9

1 Answers1

4

These folders are not made/used by the system during user creation because the system doesn't generate them. They are generated the package xdg-user-dirs-update (Ubuntu) and xdg-user-dirs (Fedora/RHEL).

The file /usr/bin/xdg-user-dirs-update is run at logon and creates the files based on defaults in /etc/xdg/user-dirs.defaults, or if it exists $HOME/.config/user-dirs.dirs.

If you want to disable it, the setting is in /etc/xdg/user-dirs.conf, or uninstall the package, if dependencies allow.

Reference: Who is creating Documents/Video/Pictures/etc. in home directory

Zachary Brady
  • 4,200
  • 2
  • 17
  • 40