The Problem Unable to unmount a Windows share mount point using umount command. This Windows share is not being used by any processes recently. When executing umount command, following error is seen; # umount: /mycloud: device is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) […]
Archives for April 2019
How to interpret Linux martian source messages
What is a Martian Packet? The IANA defines a Martian packet as one which arrives on an interface where the interface does not use that network. For Linux, it’s any packet that arrives on an interface which is not configured for that subnet in any way. Any martian packet notice should be investigated. Martian packets: […]
How to copy directories recursively using rsync while excluding specific files
Question: How to copy folders recursively while excluding specific folders/files whhen using rsync? In general, we use ‘cp’ command to copy files, but unfortunately, ‘cp’ command doesn’t have the “exclude” feature, so we need to write some scripts to exclude the unwanted files, or we can use another tool ‘rsync’. From the man page of […]
Inconsistent Device Names Across Reboot Cause Mount Failure Or Incorrect Mount in Linux
The Problem A disk partition does not mount after a system boot, whether the reboot was planned or unplanned. Before the reboot, the disk partition was mounted and working properly. The disk has mounted correctly after other system reboots, but no longer works. This behavior can happen regardless of the type of file system on […]
“sudo: /etc/sudoers is world writable” – How to correct the permissions of sudoers file
Question: How to correct /etc/sudoers file permission (e.g. of issue found). $ sudo syscheck sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin You may encounters error as shown above if the sudoers file permissions are incorrect. Follow the steps below to correct the permissions. 1. […]
Configuring sudo to Enable Commands for Non-Root Users in Linux
This post describes how to give sudo permission to non-root users to enable or disable execution of commands. “sudo” tool is used to allow non-root users to run commands that require root privileges. It allows users to run commands as superuser or another user. Login as root user and open “/etc/sudoers” file in edit mode […]
How To Create An Almost Root Equivalent Users But Not Root Identical User in Linux
Question: How can we have extra root users, because from security point of view we should keep the root user safe from daily accessing and use another “AS ROOT” user otherwise if root is blocked for any reason we may can’t access the server. Need to create an almost root equivalent users but not root […]
Permission Table for a File/Directory And File System Users Types
The goal of the post is to give brief information about the types of user for a filesystem and the permission available for a file/directory. The table below gives numbers for all for permissions types of a File/Directory Number Permission Type Symbol 0 No Permission […]
How to Setup a sudo Switch to Another User That Has no Password or ssh Key Set in Linux
This post outlines steps to setup a sudo access to a specific user to switch to another user that has no password of ssh key set. As test user (having privilede to edit sudoers file), add to the sudoers file with visudo: $ sudo visudo the following line is added to sudoers file for the […]