This is what I'm trying to do in a script. It works here manually, but prompts me for a password. How do I:
- Create a new user
- With sudo privs
- Switch to that user
Continue executing the rest of the script
sudo adduser centos sudo passwd centos usermod -aG wheel centos sudo su centos
I have tried the following but in Centos 7 bash, --disabled-password and -gecos both say "option not found."
adduser --disabled-password --gecos "" username