Bug #2549
closed
(ex PT/ Technique) User Management: It's possible to create a Directive without home defined for a user.
Added by Nicolas PERRON over 12 years ago.
Updated over 9 years ago.
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 ~]#
- Target version changed from 2.3.8 to 2.3.9
- Assignee deleted (
Nicolas PERRON)
- Target version changed from 2.3.9 to 2.3.10
- 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 ?
- 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.
- Status changed from Discussion to In progress
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Jonathan CLARKE
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset commit:ad557753b4c56ddd086ec12e61b96f1476e5ee94.
Applied in changeset commit:00880213599f1eff76b3e7f8d519d1fcd92d8edf.
Applied in changeset commit:c6e8bb7c6439a16ebb4bc020612188fd5da244ff.
Applied in changeset commit:63721341c37136d714ecc163bd49cf725d40584f.
- Project changed from Rudder to 24
- Category deleted (
Techniques)
- Status changed from Pending release to Released
- Project changed from 24 to Rudder
- Category set to Techniques
Also available in: Atom
PDF