Steps to enable remote desktop access in CentOS/RHEL 7. This can either be done via the following: In the GUI 1. From an active desktop session, do the following: Ciick on Applications -> System Tools -> Settings -> Sharing -> Screen Sharing and turn it on. Using Command Line 1. Install vino-server package, vino is […]
Archives for April 2019
Connection using SSH to a Host Not in DNS/hosts Stalls for Some Time at Connection Initiation
ssh, scp or sftp to a node that doesn’t appear in DNS or /etc/hosts file is slow to make an initial connection. After the connection is established, the speed is as expected. There are two cases to consider, see below. Note that in most environments this issue will not occur since IPs will be in […]
Unmounting a Windows Share Fails in Linux
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)) […]
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 […]
How to use mdadm to create a software mirror on top of multipath devices
The Problem The mdadm tool was used to create a software RAID mirror using two device-mapper-multipath devices: # /sbin/mdadm /dev/md0 –create –verbose –level=1 –raid-devices=2 /dev/mapper/ocrp1 /dev/mapper/ocrmirrorp1 The setup was then confirmed: # /sbin/mdadm –detail /dev/md0 … Number Major Minor RaidDevice State 0 253 2 0 active sync /dev/dm-2 1 253 3 1 active sync /dev/dm-3 […]
How to remove the multipath device after unmapping the storage LUN from server
Question: How To remove the Multipath Device after Unmapping the LUN from the Server? For example the “mpath4” in below output is not in use and needs to be removed. # multipath -ll sda: checker msg is “tur checker reports path is down” sdd: checker msg is “tur checker reports path is down” 1_oracle_index ( […]
How to disable “sudo su” for users in sudoers configuration file
This post outlines steps to tighten system security by preventing users with sudo access from gaining superuser privilege by the command: $ sudo su The sudo command allows a system administrator to enable a user, or a group of users, to run specific command-line tools with different privileges (such as superuser “root” privilege) knowing only […]
How to Restrict su Access to a User Only by PAM in Linux
In some situation, you need to restrict the su access to: – only user ‘oracle’ can switch to a particular user (e.g. switch to admin by ‘su – admin’ to maintain system), switching to other users will still fail. – other users cannot access su. Modifying the default PAM setting for su can accomplish the […]