summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2014-07-10 17:31:47 +0200
committerJonathan Bauer2014-07-10 17:31:47 +0200
commita7eb77a0237d2d8373a2ed09d5100a07cdba3858 (patch)
treeb8daeb7a35b0fd152ce05b79911c3a285b92af2a
parentMerge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff)
downloadtm-scripts-a7eb77a0237d2d8373a2ed09d5100a07cdba3858.tar.gz
tm-scripts-a7eb77a0237d2d8373a2ed09d5100a07cdba3858.tar.xz
tm-scripts-a7eb77a0237d2d8373a2ed09d5100a07cdba3858.zip
[useradd.inc] GID is the 4th column not 3rd
-rw-r--r--remote/includes/useradd.inc2
1 files changed, 1 insertions, 1 deletions
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}
}