Score:0

adduser giving groupadd: failure while writing changes to /etc/group error

br flag

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?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.