Bug 785756

Summary: config-mod :: --homedirectory new value not being honored
Product: Red Hat Enterprise Linux 6 Reporter: Jenny Severance <jgalipea>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: mkosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-2.2.0-1.el6 Doc Type: Bug Fix
Doc Text:
Cause: IPA user plugin use a hard-coded default user home directory instead of using a configured default value. Consequence: When administrator changes the default user home directory in IPA config plugin from default value to custom value, it is not being honored when user is added. Fix: IPA user plugin was fixed to honor the configuration. Result: When new user is created without a custom home directory specified via special option, the default configured home directory is properly used.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 13:31:46 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 Jenny Severance 2012-01-30 14:53:08 UTC
Description of problem:

If you change the default configuration for the home directory base, new users added are not getting the correct home directory path.

# kinit admin
Password for admin: 

# ipa config-mod --homedirectory=/mnt/home
  Maximum username length: 32
  Home directory base: /mnt/home
  Default shell: /bin/sh
  Default users group: ipausers
  Default e-mail domain: testrelm.com
  Search time limit: 2
  Search size limit: 100
  User search fields: uid,givenname,sn,telephonenumber,ou,title
  Group search fields: cn,description
  Enable migration mode: FALSE
  Certificate Subject base: O=TESTRELM.COM
  Password Expiration Notification (days): 4
  SELinux user map order: guest_u:s0$xguest_u:s0$user_u:s0-s0:c0.c1023$staff_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023
  Default SELinux user: guest_u:s0

# ipa user-add --first=Jenny --last=Galipeau jenny
------------------
Added user "jenny"
------------------
  User login: jenny
  First name: Jenny
  Last name: Galipeau
  Full name: Jenny Galipeau
  Display name: Jenny Galipeau
  Initials: JG
  Home directory: /home/jenny
  GECOS field: Jenny Galipeau
  Login shell: /bin/sh
  Kerberos principal: jenny
  UID: 809400167
  GID: 809400167
  Password: False
  Kerberos keys available: False

Test is already automated ...

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_homedirectory_default
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: this is to test for default behavior
:: [   PASS   ] :: set homedirectory=[SoyF6v2XoigTJTo1BA8DSP5E_up]
:: [   LOG    ] :: Creating User: ipa user-add "swnrwnWI" --first "swnrwnWI" --last  "swnrwnWI" 
:: [   FAIL   ] :: actual [/home/swnrwnWI], expect [SoyF6v2XoigTJTo1BA8DSP5E_up] 
:: [   PASS   ] :: set homedirectory=[/home] - back to default
:: [   PASS   ] :: Cleanup
:: [   LOG    ] :: Duration: 11s
:: [   LOG    ] :: Assertions: 3 good, 1 bad
:: [   FAIL   ] :: RESULT: ipaconfig_mod_homedirectory_default



Version-Release number of selected component (if applicable):
ipa-server-2.2.0-101.20120127T0607zgit6863b8f.el6.x86_64

How reproducible:


Steps to Reproduce:
1.  kinit admin
2.  ipa-config-mod --homedirectory=/mnt/home
3.  ipa user-add --first=firstname  --last=lastname  userid
  
Actual results:
  Home directory: /home/jenny

Expected results:
  Home directory: /mnt/home/jenny

Additional info:

Comment 1 Martin Kosek 2012-01-31 16:08:40 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2332

Comment 4 Jenny Severance 2012-04-18 12:12:11 UTC
verified:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_homedirectory_default
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: this is to test for default behavior
:: [   PASS   ] :: set homedirectory=[QsA/0ZV/0Q+3fhltQrqU-BFE3EHloP9hMVl9JhOLi6nAec8cTBuUdn1fkreWY45Bqyni5c2OVW/Zoeg+6Bror0/rsRUj5hV6RCBAnA7u2N/Y6dS.0ekhpHkkC/Fjdf3QJM]
:: [   LOG    ] :: Creating User: ipa user-add "GhsQbDDU" --first "GhsQbDDU" --last  "GhsQbDDU" 
:: [   PASS   ] :: found [QsA/0ZV/0Q+3fhltQrqU-BFE3EHloP9hMVl9JhOLi6nAec8cTBuUdn1fkreWY45Bqyni5c2OVW/Zoeg+6Bror0/rsRUj5hV6RCBAnA7u2N/Y6dS.0ekhpHkkC/Fjdf3QJM] in actual:[QsA/0ZV/0Q+3fhltQrqU-BFE3EHloP9hMVl9JhOLi6nAec8cTBuUdn1fkreWY45Bqyni5c2OVW/Zoeg+6Bror0/rsRUj5hV6RCBAnA7u2N/Y6dS.0ekhpHkkC/Fjdf3QJM/ghsqbddu]
:: [   PASS   ] :: set homedirectory=[/home] - back to default
:: [   PASS   ] :: Cleanup
:: [   LOG    ] :: Duration: 23s
:: [   LOG    ] :: Assertions: 4 good, 0 bad
:: [   PASS   ] :: RESULT: ipaconfig_mod_homedirectory_default


version :
ipa-server-2.2.0-9.el6.x86_64

Comment 5 Martin Kosek 2012-04-20 12:25:08 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: IPA user plugin use a hard-coded default user home directory instead of using a configured default value.
Consequence: When administrator changes the default user home directory in IPA config plugin from default value to custom value, it is not being honored when user is added.
Fix: IPA user plugin was fixed to honor the configuration.
Result: When new user is created without a custom home directory specified via special option, the default configured home directory is properly used.

Comment 7 errata-xmlrpc 2012-06-20 13:31:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0819.html