From a7eb77a0237d2d8373a2ed09d5100a07cdba3858 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 10 Jul 2014 17:31:47 +0200 Subject: [useradd.inc] GID is the 4th column not 3rd --- remote/includes/useradd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remote/includes/useradd.inc b/remote/includes/useradd.inc index 5d7d405d..a8f407f7 100644 --- a/remote/includes/useradd.inc +++ b/remote/includes/useradd.inc @@ -44,7 +44,7 @@ get_gid_for_user() { [ $# -ne 1 ] && perror "get_gid_for_user fail. want 1 argument." [ -z "${_PASSWD}" ] && perror "passwd file not set." - local _GID=$(grep -E "^$1:[^:]*:[^:]*:[0-9]+:" "${_PASSWD}" | head -1 | awk -F ':' '{print $3}') + local _GID=$(grep -E "^$1:[^:]*:[^:]*:[0-9]+:" "${_PASSWD}" | head -1 | awk -F ':' '{print $4}') echo ${_GID} } -- cgit v1.2.3-55-g7522