I don't understand how umask works in these two files: my machine doesn't use pam_umask module.
If I change user and create a new file/directory, the umask used is taken from /etc/profile (the umask in /etc/login.defs is unused).
Which is the purpose of umask in /etc/login.defs?
From the manpage seems it is used only for the permission definition of an home directory for new users: is it correct?
/etc/profilewhen invoked as login shell. A typical example when/etc/profileis not executed and umask set there is not effective when logging in graphical session or when logging in via ssh and providing a command to execute. – sebasth Aug 15 '18 at 19:19