File in /etc/skel/ ending in Space causes adduser to fail

Bug #1459463 reported by Dean
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
adduser (Ubuntu)
New
Undecided
Unassigned

Bug Description

Repro is quite simple, place a file in `/etc/skel/` who's filename ends with the space character.
When running `adduser`, an error `No such file or directory` will be thrown.

Instructions:

 $ sudo touch "/etc/skel/file-with-space "
 $ sudo adduser test

What I expected to happen:

- User to be created

What happened instead:

- Error thrown, user not created.

Example:

 $ sudo touch "/etc/skel/file-with-space "
 $ sudo adduser test
 Adding user `test' ...
 Adding new group `test' (1001) ...
 Adding new user `test' (1001) with group `test' ...
 Creating home directory `/home/test' ...
 Copying files from `/etc/skel' ...
 Stopped: open /etc/skel/./file-with-space : No such file or directory
 Removing directory `/home/test' ...
 Removing user `test' ...
 Removing group `test' ...
 groupdel: group 'test' does not exist
 adduser: `groupdel test' returned error code 6. Exiting.

 $ lsb_release -rd
 Description: Ubuntu 14.04.2 LTS
 Release: 14.04

 $ apt-cache policy adduser
 adduser:
   Installed: 3.113+nmu3ubuntu3
   Candidate: 3.113+nmu3ubuntu3
   Version table:
  *** 3.113+nmu3ubuntu3 0
         500 http://au.archive.ubuntu.com/ubuntu/ utopic/main amd64 Packages
         100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: adduser 3.113+nmu3ubuntu3
ProcVersionSignature: Ubuntu 3.13.0-46.77-generic 3.13.11-ckt15
Uname: Linux 3.13.0-46-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.7
Architecture: amd64
CurrentDesktop: Unity
Date: Thu May 28 09:22:23 2015
InstallationDate: Installed on 2013-11-06 (567 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
PackageArchitecture: all
SourcePackage: adduser
UpgradeStatus: Upgraded to trusty on 2015-03-08 (80 days ago)

Revision history for this message
Dean (deanrather) wrote :
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.