option to change defaults restricts access to defaults file

Bug #1223008 reported by Jamin W. Collins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
shadow (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

The option to update defaults (-D or --defaults along with any other option) results in more restricted rights to the defaults file.

Before using the command:

$ ls -l useradd
-rw-r--r-- 1 root root 1118 Sep 9 13:10 useradd

Now update a default value:

$ sudo useradd -D -s /bin/bash
$ ls -l useradd
-rw------- 1 root root 1197 Sep 9 13:11 useradd

Furthermore, this permissions change isn't readily apparent as there is no error when requesting the display of the defaults as a non-root user. However the data displayed is indeed different:

$ useradd -D
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no

$ sudo useradd -D
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: passwd 1:4.1.5.1-1ubuntu4.1
ProcVersionSignature: Ubuntu 3.8.0-30.44-generic 3.8.13.6
Uname: Linux 3.8.0-30-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.9.2-0ubuntu8.4
Architecture: amd64
Date: Mon Sep 9 13:07:25 2013
InstallationDate: Installed on 2009-12-21 (1358 days ago)
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
MarkForUpload: True
SourcePackage: shadow
UpgradeStatus: Upgraded to raring on 2013-04-26 (136 days ago)
modified.conffile..etc.default.useradd: [inaccessible: [Errno 13] Permission denied: '/etc/default/useradd']

Revision history for this message
Jamin W. Collins (jcollins) wrote :
tags: added: saucy
Changed in shadow (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.