FS#8050 - The "shadow" package: adduser changes home directory permissions set by useradd

Attached to Project: Arch Linux
Opened by Oleg Nitz (olegnitz) - Tuesday, 18 September 2007, 08:17 GMT
Last edited by Tom Killian (tomk) - Friday, 30 November 2007, 11:54 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Aaron Griffin (phrakture)
Tom Killian (tomk)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
"useradd -m" creates a home directory with permissions defined by the parameter UNAME in /etc/login.defs
But if I use the adduser script, it first calls "useradd -m" and then set permissions of the home directory to the fixed value 711 which is specified in the script (see "defchmod" variable) and cannot be changed via configuration files.

Additional info:
* package version(s)
shadow 4.0.18.1-5
This task depends upon

Closed by  Tom Killian (tomk)
Friday, 30 November 2007, 11:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in shadow 4.0.18.2-1
Comment by Oleg Nitz (olegnitz) - Tuesday, 18 September 2007, 10:57 GMT
Sorry, not UNAME but UMASK. This is the default umask value in /etc/login.defs which is overwritten by "umask 022" in /etc/profile. Thus UMASK in /etc/login.defs affects only creation of home dirs.
Comment by Thomas Bächler (brain0) - Tuesday, 18 September 2007, 11:25 GMT
That is not the point. Having 700 as the default permission for $HOME can be as desirable as 755, depending on the application. None of them is a better default than the other, so it is up to you to adjust your system the way it fits your needs.

As your solution is also unclean IMO, I am leaving this as it is.
Comment by Aaron Griffin (phrakture) - Wednesday, 28 November 2007, 17:18 GMT
Reopening this - it's related to  FS#8051  and, IMO, if adduser is our script (it is) we should update it and make it as versatile as possible
Comment by Tom Killian (tomk) - Wednesday, 28 November 2007, 20:58 GMT
OK, I'll roll this, 8051, 8724, & 8742 into the shadow 4.0.18.2 package.

Loading...