[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] GNU bash, version 4.4 – A valid command is not performed
From: |
Ricky Tigg |
Subject: |
[Help-bash] GNU bash, version 4.4 – A valid command is not performed |
Date: |
Tue, 11 Dec 2018 13:21:14 +0100 |
Hi GNU bash team. A valid command – at least it seems as such – does not
create users. – OS: Fedora.
$ echo $SHELL
/bin/bash
$ bash --version|head -n1
GNU bash, version 4.4.23(1)-release (x86_64-redhat-linux-gnu)
In my user home directory is a file containing a Users/groups list. The
permission 'x' has been added:
$ ls -l users_groups
-rwxr--r--. 1 yk yk 171 11.12. 12:25 users_groups
$ cat users_groups
#!/usr/bin/env bash
declare -A groups=(
["test_user"]="wheel,users"
)
$ sudo su
# pwd
/home/yk
The following command purpose is to create users and add them to groups.
# for user in "address@hidden"; do useradd -U -G "${groups[$user]}" "$user";
done < users_groups
#
Above command unexpectedly does not create users and subsequently cannot
associate them to the specified groups.
# groups test_user
groups: 'test_user': no such user
Any advice is welcome. Thanks, R.T.
- [Help-bash] GNU bash, version 4.4 – A valid command is not performed,
Ricky Tigg <=