21 lines
339 B
Bash
Executable file
21 lines
339 B
Bash
Executable file
create_user(){
|
|
useradd -m afonso
|
|
echo 'Insert password for user afonso'
|
|
passwd afonso
|
|
}
|
|
|
|
enable_wheel_group(){
|
|
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
|
|
}
|
|
|
|
add_user_to_wheel() {
|
|
usermod -aG wheel afonso
|
|
}
|
|
|
|
init(){
|
|
create_user
|
|
enable_wheel_group
|
|
add_user_to_wheel
|
|
}
|
|
|
|
init
|