Bug 606249 - changing default umask for new users homedir sets the current umask for ALL users including root
Summary: changing default umask for new users homedir sets the current umask for ALL u...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 11.3
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Milestone 6
Hardware: All openSUSE 11.2
: P3 - Medium : Normal (vote)
Target Milestone: Milestone 7
Assignee: Jiří Suchomel
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-16 20:38 UTC by John Andrew McInnes
Modified: 2018-12-06 13:22 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Andrew McInnes 2010-05-16 20:38:13 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/3.5.9-0.1.1 BetterPrivacy-1.47 Firefox/3.5.9

Yast->User and group management->Defaults for new users:
Change umask for home directory. Logout. Now all users & root have this as active umask value.

This caused me great confustion trying to 'sudo make install' codeblocks, as I always set my homedir umask for new users to 077. The install process used this and so all dirs wwere created as drwx------. So the program was unusable. Only root could run it.

I think it bizzare behavior. The workaround I guess is to define the umask you want the user to have in some startup script or profile. Where should it go?

Reproducible: Always

Steps to Reproduce:
Yast->User and group management->Defaults for new users:
Change umask for home directory. Logout.
Actual Results:  
user and root now use this as their umask

Expected Results:  
this umask should only affect creation of new homedirs for new users!!
Comment 1 Thomas Biege 2010-05-17 11:48:28 UTC
Yes it is confusing because it will not be the umask on NEW user but ALL user because of the change was done in /etc/login.defs.

reassigning to yast2 maintainers.
Comment 2 Vladislav Lewin 2010-05-18 08:27:27 UTC
Please attach YaST logs.
It's actually helpful to attach them to (almost) every bugreport
for YaST.                                                       

See http://en.opensuse.org/Bugs/YaST
Comment 3 Jiří Suchomel 2010-05-18 11:36:05 UTC
The UMASK value set in YaST is saved to /etc/login.defs.

I assume the described behavior is correct, based on the value present in this file.
Comment 4 Thorsten Kukuk 2010-05-18 12:14:40 UTC
/etc/login.defs is, to my knowledge, only read by useradd and pam_umask.
pam_umask is not configured by default.

So YaST2 is doing everything correct.

Maybe pam_umask was enabled on that system? Else somebody else is reading that config file, who shouldn't do that.
Comment 5 John Andrew McInnes 2010-05-19 01:32:03 UTC
Are you guys not able to reproduce this?

I just reproduced it on a different 11.2 x86_64 machine. The machine has all updates as of last week installed.

Enter yast->users->defaults for new user.
Set umask.
Log out, all the way, or reboot.
Log in.
User has this umask.
su -
root has this umask.
Comment 6 Jiří Suchomel 2010-05-19 07:58:24 UTC
> pam-config -q --umask
session:


This is probably the default for 11.3: I did not change anything and can reproduce the behavoir.


Does this mean that the behavior is correct?
Comment 7 Thorsten Kukuk 2010-05-19 08:02:30 UTC
/etc/login.defs is the very, very last fallback for pam_umask. So if you don't configure it anywhere else, yes, the behavior is correct.
Comment 8 Jiří Suchomel 2010-05-19 08:06:20 UTC
YaST really only writes /etc/login.defs. 

So when current setting for pam_umask is correct, the bug is invalid.
Comment 9 Thorsten Kukuk 2010-05-19 09:05:46 UTC
too avoid further confusion, we will move UMASK from /etc/login.defs to /etc/default/useradd, so that it is clear that only useradd is and can use this value.
Comment 10 Jiří Suchomel 2010-05-24 12:20:15 UTC
Done in yast2-users-2.19.14
Comment 11 Bernhard Wiedemann 2016-04-15 11:45:09 UTC
This is an autogenerated message for OBS integration:
This bug (606249) was mentioned in
https://build.opensuse.org/request/show/40422 Factory / pwdutils
https://build.opensuse.org/request/show/40571 Factory / yast2-users