**In raising this issue, I confirm the following:** `{please fill the checkboxes…, e.g: [X]}`
- [X] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md).
- [X] The issue I am reporting can be *replicated*.
- [X] The issue I am reporting isn't a duplicate (see [FAQs](https://github.com/pi-hole/pi-hole/wiki/FAQs), [closed issues](https://github.com/pi-hole/pi-hole/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), and [open issues](https://github.com/pi-hole/pi-hole/issues)).
**How familiar are you with the the source code relevant to this issue?:**
`{10}`
The issue is in `create_pihole_user()` in `basic-install.sh` not checking first if the group `pihole` exists. An additional if statement should be added to utilise an alternate `useradd` command such as `useradd -r -s /usr/sbin/nologin -g pihole pihole`
---
**Expected behaviour:**
Pihole successfully installing
**Actual behaviour:**
Pihole fails to create user pihole and then installation fails when attempting to access non-existent gravity.sh
```
zander@zpi:~/Pi-hole/automated install$ sudo bash basic-install.sh
[✓] Root user check
.;;,.
.ccccc:,.
:cccclll:. ..,,
:ccccclll. ;ooodc
'ccll:;ll .oooodc
.;cll.;;looo:.
.. ','.
.',,,,,,'.
.',,,,,,,,,,.
.',,,,,,,,,,,,....
....''',,,,,,,'.......
......... .... .........
.......... ..........
.......... ..........
......... .... .........
........,,,,,,,'......
....',,,,,,,,,,,,.
.',,,,,,,,,'.
.',,,,,,'.
..'''.
[i] Existing PHP installation detected : PHP version 7.2.24-0ubuntu0.18.04.3
[✓] Disk space check
[✓] Update local cache of available packages
[✓] Checking apt-get for upgraded packages... up to date!
[i] Installer Dependency checks...
[✓] Checking for apt-utils
[✓] Checking for dialog
[✓] Checking for debconf
[✓] Checking for dhcpcd5
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for whiptail
[i] Using interface: eth0
[i] Using [i] Static IP already configured
[i] Found IPv6 GUA address, using it for blocking IPv6 ads
[i] IPv4 address: 192.168.124.7/24
[i] IPv6 address: 2c0f:ef18:2410:0:d104:44df:86f5:5747
[i] Web Interface On
[i] Web Server On
[i] Logging On.
[✓] Check for existing repository in /etc/.pihole
[✓] Update repo in /etc/.pihole
[✓] Check for existing repository in /var/www/html/admin
[✓] Update repo in /var/www/html/admin
[i] Main Dependency checks...
[✓] Checking for cron
[✓] Checking for curl
[✓] Checking for dnsutils
[✓] Checking for iputils-ping
[✓] Checking for lsof
[✓] Checking for netcat
[✓] Checking for psmisc
[✓] Checking for sudo
[✓] Checking for unzip
[✓] Checking for wget
[✓] Checking for idn2
[✓] Checking for sqlite3
[✓] Checking for libcap2-bin
[✓] Checking for dns-root-data
[✓] Checking for resolvconf
[✓] Checking for libcap2
[✓] Checking for lighttpd
[✓] Checking for php7.2-common
[✓] Checking for php7.2-cgi
[✓] Checking for php7.2-sqlite3
[✓] Enabling lighttpd service to start on reboot...
[i] Creating user 'pihole'...useradd: group pihole exists - if you want to add this user to that group, use -g.
[✗] Creating user 'pihole'
[i] FTL Checks...
[✓] Detected ARM-aarch64 architecture
[i] Checking for existing FTL binary...
[i] Latest FTL Binary already installed (v4.3.1). Confirming Checksum...
[i] Checksum correct. No need to download!
[i] Creating user 'pihole'...useradd: group pihole exists - if you want to add this user to that group, use -g.
[✗] Creating user 'pihole'
usermod: user 'pihole' does not exist
grep: /etc/pihole/setupVars.conf: No such file or directory
[i] Testing if systemd-resolved is enabled
[i] Systemd-resolved does not need to be restarted
[✓] Restarting lighttpd service...
[✓] Enabling lighttpd service to start on reboot...
[i] Restarting services...
[✓] Enabling pihole-FTL service to start on reboot...
[✓] Restarting pihole-FTL service...
basic-install.sh: line 1724: /opt/pihole/gravity.sh: No such file or directory
```
**Steps to reproduce:**
Try to install pihole while the group `pihole` already exists
**Debug token provided by [uploading `pihole -d` log](https://discourse.pi-hole.net/t/the-pihole-command-with-examples/738#debug):**
N/A
**Troubleshooting undertaken, and/or other relevant information:**
`groupdel pihole`
The group `pihole` existed from a previous pihole installation I removed. Not sure if the uninstaller failed to remove the group as well as the user `pihole` or it may be an oversight in the uninstaller