Closed MCatherine1994 closed 3 years ago
We can check /etc/group (for group) and /etc/passwd (for user) for existing entries before creating the group or user. e.g. for group check something like this should work: if [ $(grep -c "^shoal" /etc/group) -eq 0 ]; then groupadd shoal fi