Bug 59627

Summary: Usernames with spaces cause user-visible error on login
Product: [Retired] Red Hat Linux Reporter: Mark Cooke <mpc>
Component: setupAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-02-11 16:23:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mark Cooke 2002-02-11 14:22:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20020104

Description of problem:
/etc/profile contains a number of places where variable expansion - particularly
of user and group names - with spaces cause error messages.

This was exposed using winbind and the latest samba packages.

Adding extra "'s around `id *` calls fixes this.

Ie,

if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 14 ]; then
        umask 002
else
        umask 022
fi

(Just a bugzilla report against a message I read on the samba list)

As an extension to this, including files from /etc/profile.d/ doesn't look
space-safe either.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Setup a user name with a space
2.Login


Actual Results:  Doesn't reset the umask correctly.

Expected Results:  It should

Additional info:

Comment 1 Bill Nottingham 2002-02-11 16:22:15 UTC
Usernames with spaces are generally discouraged.

Comment 2 Bill Nottingham 2002-03-11 06:06:22 UTC
Fixed in 2.5.8-1