On Mon, May 17, 2010 at 2:22 PM, Santiago Vila <[email protected]> wrote: > On Mon, 17 May 2010, Timo Juhani Lindfors wrote: > >> Santiago Vila <[email protected]> writes: >> > In either case, if we plan to set default umask in /etc/login.defs or >> >> /etc/login.defs is not read when I login to openssh server and it has >> "UseLogin" set to false. If I enable UseLogin then X11 forwarding >> stops working [1]. To me it seems that login.defs can not be the only >> place where umask is set. > > Ok, what about PAM? > > I would *really* like to drop umask setting from /etc/profile and rely on > something of lower level, be it login.defs, PAM or whatever. > > What would be the steps required to be able to drop umask from /etc/profile?
See http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/sag-pam_umask.html Put this to /etc/pam.d/common-session file: session optional pam_umask.so umask=002 And it will work Regards Bastien > > -- > To UNSUBSCRIBE, email to [email protected] > with a subject of "unsubscribe". Trouble? Contact [email protected] > Archive: > http://lists.debian.org/[email protected] > > -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

