How to Disable quota for a Linux User or Group on the Shell

Linux user quotas can be edited with the commands edquota or setquota on the shell. While edquota opens the quota settings in an editor like vim, setquota allows you to specify the quota settings on the command line. Example for disabling the quota for the user "testuser": setquota -u testuser 0 0 0 0 -a ... Read more

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: root@workstation:/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 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