Project

General

Profile

Actions

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 almost 12 years ago. Updated about 9 years ago.

Status:
Released
Priority:
3
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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 ~]#
Actions #1

Updated by Jonathan CLARKE over 11 years ago

  • Target version changed from 2.3.8 to 2.3.9
Actions #2

Updated by Jonathan CLARKE over 11 years ago

  • Assignee deleted (Nicolas PERRON)
Actions #3

Updated by Nicolas PERRON over 11 years ago

  • Target version changed from 2.3.9 to 2.3.10
Actions #4

Updated by Nicolas CHARLES about 11 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 ?

Actions #5

Updated by Nicolas PERRON about 11 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.

Actions #6

Updated by Nicolas CHARLES about 11 years ago

  • Status changed from Discussion to In progress
Actions #7

Updated by Nicolas CHARLES about 11 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE
Actions #8

Updated by Nicolas CHARLES about 11 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset commit:ad557753b4c56ddd086ec12e61b96f1476e5ee94.

Actions #9

Updated by Jonathan CLARKE about 11 years ago

Applied in changeset commit:00880213599f1eff76b3e7f8d519d1fcd92d8edf.

Actions #10

Updated by Nicolas PERRON about 11 years ago

Applied in changeset commit:c6e8bb7c6439a16ebb4bc020612188fd5da244ff.

Actions #11

Updated by Nicolas PERRON about 11 years ago

Applied in changeset commit:63721341c37136d714ecc163bd49cf725d40584f.

Actions #12

Updated by Jonathan CLARKE about 11 years ago

  • Project changed from Rudder to 24
  • Category deleted (Techniques)
Actions #13

Updated by Nicolas PERRON about 11 years ago

  • Status changed from Pending release to Released
Actions #14

Updated by Benoît PECCATTE about 9 years ago

  • Project changed from 24 to Rudder
  • Category set to Techniques
Actions

Also available in: Atom PDF