Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Script install.sh - Could not create user #5785

Open
ghost opened this issue Oct 13, 2017 · 2 comments
Open

Script install.sh - Could not create user #5785

ghost opened this issue Oct 13, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2017


BUG REPORT INFORMATION

Centreon Web version: 2.8.x

Centreon Engine version: 1.7

Centreon Broker version: 2.12

OS: Ubuntu 16.04 LTS

Steps to reproduce the issue:

  1. Clone and Install Centreon Clib, Centreon Engine, Centreon Broker from Git.
  2. Clone Centreon from Git and launch "install.sh".

Describe the results you received:
Do you want me to create this user ? [centreon]
[y/n], default to [n]:

y
useradd: invalid home directory ''
Could not create user centreon FAIL
The user centreon does not exist. CRITICAL

@lpinsivy
Copy link
Contributor

This patch should correct this issue:

--- libinstall/functions.origin	2017-11-15 11:13:09.417910995 +0100
+++ libinstall/functions	2017-11-15 11:31:14.251508075 +0100
@@ -1837,7 +1838,7 @@
 		fi
 	fi
 	if [ -z "$CENTREON_USER" ] ; then
-		answer_with_createuser "$(gettext "What is the Centreon user ?") [$DEFAULT_CENTREON_USER]" "$DEFAULT_CENTREON_USER" "CENTREON_USER"
+		answer_with_createuser "$(gettext "What is the Centreon user ?") [$DEFAULT_CENTREON_USER]" "$DEFAULT_CENTREON_USER" "CENTREON_USER" "$groups" "$description" "$home"
 	fi
 	log "INFO" "$(gettext "Centreon user") : $CENTREON_USER"
 	return 0

@adr-mo
Copy link
Contributor

adr-mo commented Nov 27, 2017

If user centreon does not exist then script asks if it needs to be created.
Answering yes lets the script create the user.
The user is created OK

Looks good to me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants