superboy2k6
Member
Hey so I wanted to create a shell script so that a user is added in which the user has sudo privilleges. My code went like this:
It did create the user with the password but there was an issue. The CLI reported to me back that a group called sudo does not exist.
How to fix that? I don't want to manually add a user to the sudoers file.
Running Arch on a VM, freshly installed with xfce, Plank and Chromium.
Code:
#!/bin/bash
useradd liveuser ; echo -e "liveuser\nliveuser" | passwd liveuser
usermod -aG sudo liveuser
su liveuser
exit
How to fix that? I don't want to manually add a user to the sudoers file.
Running Arch on a VM, freshly installed with xfce, Plank and Chromium.