Bug #2549
closed(ex PT/ Technique) User Management: It's possible to create a Directive without home defined for a user.
Description
No check avoid to define a user without home.
If "Use the default home directory:" is set to false, it's possible to let empty "Home directory, if not default (optional):"
Nevertheless, the promise will not be able to create the user:
[root@centos-6-64 ~]# /var/rudder/cfengine-community/bin/cf-agent -KI -b check_usergroup_user_parameters !! Duplicate selection of value for variable "execRun" in scope g !! Rule from /var/rudder/cfengine-community/inputs/common/1.0/site.cf at/before line 58 >> Using command line specified bundlesequence -> Executing '/usr/sbin/useradd -m -s /bin/bash -d $(usergroup_user_home[1]) userQA2' ...(timeout=-678,owner=-1,group=-1) !! Finished command related to promiser "/usr/sbin/useradd" -- an error occurred (returned 3) Q: "...in/useradd -m ": useradd: invalid home directory '$(usergroup_user_home[1])' I: Last 1 quoted lines were generated by promiser "/usr/sbin/useradd -m -s /bin/bash -d $(usergroup_user_home[1]) userQA2" -> Completed execution of /usr/sbin/useradd -m -s /bin/bash -d $(usergroup_user_home[1]) userQA2 R: @@userGroupManagement@@result_error@@50d28030-4e21-4c47-8b9b-fe0c4b39e405@@b887d02f-12ea-4dc9-96d5-563fc4b5bfbc@@9@@Users@@userQA2@@2012-06-07 16:26:38+02:00##06da3556-5204-4bd7-b3b0-fa5e7bcfbbea@#The user userQA2 ( Without any defined full name ) could not be added to the system [root@centos-6-64 ~]#
Updated by Jonathan CLARKE over 12 years ago
- Target version changed from 2.3.8 to 2.3.9
Updated by Nicolas PERRON about 12 years ago
- Target version changed from 2.3.9 to 2.3.10
Updated by Nicolas CHARLES almost 12 years ago
- Status changed from New to Discussion
- Assignee set to Nicolas PERRON
If I understand, the issue is that we can in the form set Use the default home directory to false, and not fill Home directory, if not default (optional) ?
It's a limitation of the form in Rudder, and that can't be solved in 2.3,2.4 or 2.5
However, we can, in the technique, check if the variable is define, and fail earlier in the execution.
Is that what you expected ?
Updated by Nicolas PERRON almost 12 years ago
- Assignee changed from Nicolas PERRON to Nicolas CHARLES
Nicolas CHARLES wrote:
If I understand, the issue is that we can in the form set Use the default home directory to false, and not fill Home directory, if not default (optional) ?
It's a limitation of the form in Rudder, and that can't be solved in 2.3,2.4 or 2.5
You're right. This is the problem
However, we can, in the technique, check if the variable is define, and fail earlier in the execution.
Is that what you expected ?
If this is not possible in the interface to prevent the user to do so, this solution seems acceptable to me.
Updated by Nicolas CHARLES almost 12 years ago
- Status changed from Discussion to In progress
Updated by Nicolas CHARLES almost 12 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Jonathan CLARKE
The pull request is here
https://github.com/Normation/rudder-techniques/pull/32
Updated by Nicolas CHARLES almost 12 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset commit:ad557753b4c56ddd086ec12e61b96f1476e5ee94.
Updated by Jonathan CLARKE almost 12 years ago
Applied in changeset commit:00880213599f1eff76b3e7f8d519d1fcd92d8edf.
Updated by Nicolas PERRON almost 12 years ago
Applied in changeset commit:c6e8bb7c6439a16ebb4bc020612188fd5da244ff.
Updated by Nicolas PERRON almost 12 years ago
Applied in changeset commit:63721341c37136d714ecc163bd49cf725d40584f.
Updated by Jonathan CLARKE almost 12 years ago
- Project changed from Rudder to 24
- Category deleted (
Techniques)
Updated by Nicolas PERRON almost 12 years ago
- Status changed from Pending release to Released
Updated by Benoît PECCATTE almost 10 years ago
- Project changed from 24 to Rudder
- Category set to Techniques