Method 1: using terminal
sudo sh -c "echo 'allow-guest=false' >> /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf"
or
sudo sh -c 'printf "[Seat:*]\nallow-guest=false\n" > /usr/share/lightdm/lightdm.conf.d/50-no-guest.conf' (this will create a new file : 50-no-guest.conf ){codeBox}
Method 2: using text editor (GUI]
gksu gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf and add this line to it :
allow-guest=false
or
gksu gedit /usr/share/lightdm/lightdm.conf.d/50-no-guest.conf' and add this lines to it:
[Seat:*]
allow-guest=false{codeBox}