I'm trying to add user with following cmd in debian machine.
adduser --disabled-login --shell '/bin/pre_cli_script.sh' --gecos GECOS 'aa1' > /dev/null && usermod -G 'kashya' 'aa1' && usermod -p '$6$kashya$QopvxfLtcOLSimw5IkW7hgafEIEiVKoyENQsr0/lqtqjzgPfghXqs.eTUFM3M/5dJKzGwbnlptS93cJqDx5930' 'aa1' && chown -R 'aa1':'aa1' '/home/aa1' && chmod -R o-rwx '/home/aa1'
It's getting following error.
Adding user `test' ...
Adding new group `test' (1004) ...
groupadd: failure while writing changes to /etc/group
adduser: `/usr/sbin/groupadd -g 1004 test' returned error code 10. Exiting.
output of
ls -al /etc/group
-rw-r--r-- 1 root root 1034 Mar 23 01:25 /etc/group
How can I resolve this issue?