How to prevent that a user deletes a file owned by root in his home directory

Even though a file is held by root and has 700 rights, if the root user saves it in another user's home directory or any other directory owned by another user, that user can remove the file. Example: [email protected]:/home/otheruser# ls -la total 8 drwxr-xr-x 2 otheruser otheruser 4096 Jul 28 11:52 . drwxr-xr-x 3 root      ... Read more

How to prevent a Linux system user from logging into the system

The shell setting in /etc/passwd determines whether a Linux system user may log in via the shell or over SSH. If you don't want a certain user to be able to log in, set the shell to /bin/false or /sbin/nologin. For the user "otheruser" on Debian and Ubuntu Linux, here's an example: usermod -s /bin/false ... Read more

How can I download an entire website on Linux and Windows 10

Download website

Sometimes you might want to download an entire website e.g. to archive it or read it offline. This tutorial will show you which application can be used on Windows and Linux. I will use the tool wget here, which's a command-line program that is available for Windows, Linux, and MAC. Install wget on Windows First, download and ... Read more

How to set a VNC password

VNC Password

The Linux TigerVNC Server provides a command to set a new password. Set VNC Password The command is "vncpasswd", the password is stored in encrypted form into the file ~/.vnc/passwd of the home directory of the user. Run: vncpasswd to set a new password for the currently logged-in user. The command will then prompt for the ... Read more

How to convert filenames or text to lowercase on the Linux command line

Linux tolower command

There is no simple 'tolower' command on the bash, but you can convert uppercase characters to lowercase with a little shell script. The script uses the tr command internally for converting the chars. Create a shell script with the name 'tolower' that converts all text that is given as a command-line argument to lower case: ... Read more