I just installed Ubuntu Linux (16.04 LTS) last night. This is the first copy of Linux I've installed. I did use Linux for maybe a few weeks over 10 years ago, but I was very young at the time and didn't really understand its significance.
One of the first things I wanted to do after using this operating system was remove the guest login feature out of an abundance of caution.
I did a Google search and came across this website that instructs one to enter a couple lines of code into a terminal window to remove the feature: http://ubuntuhandbook.org/index.php/2016/04/remove-guest-session-ubuntu-16-04/
I wish I had done more research on the issue before entering this code (I guess since the domain looked legitimate, it showed up among the first Google Search results, the author seemed knowledgeable, and the code didn't "look" malicious, I assumed everything would work out the way it should). But, upon entering the first code and entering my password (see the code below), I got an error message that said the directory or file already exists. This is the code in question:
sudo mkdir /etc/lightdm/lightdm.conf.d
As I said, I believe the error message was letting me know that file or directory already exists. I then read the comments on the post and saw that people found inaccuracies in the code.
But when I entered the second piece of code (see below), I did not get an error message. Upon restarting my computer, the guest login feature was removed. The code:
sudo sh -c 'printf "[SeatDefaults]\nallow-guest=false\n" > /etc/lightdm/lightdm.conf.d/50-no-guest.conf'
For posterity's sake, this is how the author recommends reverting the code to bring back the guest login feature:
sudo rm /etc/lightdm/lightdm.conf.d/50-no-guest.conf
My concern is that, since the first piece of code seemed to give an error message or the like, this code may have done something untoward to the operating system. Could someone let me know if this is the case, or reassure me if it's not?
EDIT: 2017-07-05 @ 20:20 UTC
See also this newer thread that addresses my questions, "How Do I Revert Ubuntu 16.04 LTS to Its Original State? Is a Clean Install Necessary?" How Do I Revert Ubuntu 16.04 LTS to Its Original State? Is a Clean Install Necessary?