This is a relatively trivial topic, but comes up quite often. For securing content on a server, you’ll often want to password protect entire domains or paths. Add the following to the correct block in your httpd.conf and you should be ready to go.
If you have a complex environment, you may want to consider having individual password files for each asset.
AuthName "Restricted Files"
To create/clobber a new file for the first user:
sudo htpasswd -c /etc/apache2/.htpasswd YOURUSER
To add additional users:
sudo htpasswd /etc/apache2/.htpasswd YOURUSER
(repeat for new users without the -c as that creates/clobbers the file)
Ubuntu continues to make great strides with improvement to the User Interface for the ‘common’ user. Unfortunately this sometimes comes at the cost of security. 12.10 added a “Guest” account to the launch screen, to allow a new session to be opened. This is not always useful as it represents a potential security concern.
A single line command and reboot will remove it:
sudo sh -c 'echo "allow-guest=false" >> /etc/lightdm/lightdm.conf'
Similarly “Remote Login” can also be hidden/removed.
sudo sh -c 'echo "greeter-show-remote-login=false" >> /etc/lightdm/lightdm.conf'
WARNING: This will cause some problems in 15.10 (and likely some earlier versions before). See the following for the new method.
sudo sh -c 'printf "[SeatDefaults]\nallow-guest=false\n" >/usr/share/lightdm/lightdm.conf.d/50-no-guest.conf'
Ever wonder how that ‘security’ statement is put on many corporate PC’s?
Here’s how to do it yourself for Windows (should work on XP/2K/NT).
Edit your registry (not for the non-technically inclined as you could render Windows unusable if you mess up!):
legalnoticetext – By logging on…
legalnoticecaption – Important Notice:
Thats it, the caption is the window name, the text is paragraphs of whatever you’d like it to say!