bb77d1a30f5fe0eb2df8dc43d5abbfc8b80dcdb3
[automated-distro-installer] / fai / config / scripts / DEBIAN / 10-rootpw
1 #! /bin/bash
2
3 error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
4
5 # set root password
6 if [ -n "$ROOTPW" ]; then
7 $ROOTCMD usermod -p "$ROOTPW" root
8 else
9 $ROOTCMD usermod -L root
10 # enable sudo for user
11 ainsl /etc/sudoers "$username ALL = ALL"
12 fi
13
14 exit $error