I was trying to make a script to set up a sudo user . Copy pasting one by one Debian commands work , but not running in script .
Debian9=$(lsb_release -a 2>/dev/null | grep '^Description' | awk '{print $2}')
if [[ $Debian9 == Debian ]] ; then
su root
SU_user=$(stat -c '%U' ./)
adduser "$SU_user" sudo
else
other_distro_sudo_user_setup
fi
continue_script
line 5: adduser: command not found
Not really necessary but I'm wondering if this can be done somehow ?