-
Notifications
You must be signed in to change notification settings - Fork 92
Closed
Description
OS: Ubuntu 14.10
ISO: Ubuntu-mini-remix.12.04.iso
Customizer version: 4.1.0 (stable)
In an attempt to disable automatic login, a custom user (exampleuser) was created and the "Live user" field was left empty.
Custom user has been added to sudo group:
exampleuser@example-host:~$ groups
exampleuser sudo
Custom user attempts to execute command using sudo:
exampleuser@example-host:~$ sudo su -
sudo: >>> /etc/sudoers: syntax error near line 29 <<<
sudo: parse error in /etc/sudoers near line 29
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Empty "Live user" field creates trailing line with no username:
root@example-host:~# tail /etc/sudoers
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# see sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
ALL=(ALL) NOPASSWD: ALL
If no custom root password is set, root is not accessible and therefore, the faulty line in /etc/sudoers cannot be removed. The line is not present in /etc/sudoers prior to rebuilding the ISO.
Resolution should check for empty string, if string is empty, skip the call for the change_user function.