The below post explains steps to divert syslog to different files for each client. 1. Open and edit /etc/rsyslog.conf, then add below lines: $template FILENAME,”/var/log/%fromhost-ip%/messages” *.* ?FILENAME 2. Restart rsyslog service to take effect: # systemctl restart rsyslog.service or # service rsyslog restart 3. Each of client’s messages will be generated dynamically depending on client’s […]
Archives for June 2019
How to Make User Account Read-Only in CentOS/RHEL 7
Question: How to create a user account which cannot write to any file on the system? In other words, how to create a read-only user account in CentOS/RHEL 7? Linux does not provide a role-level classification of accounts. Access permission is controlled at the I-node level which implies permissions for each individual file or directory […]
How to run Hadoop without using SSH
The start-all.sh and stop-all.sh scripts in the hadoop/bin directory will use SSH to launch some of the Hadoop daemons. If for some reason SSH is not available on the server, please follow the steps below to run Hadoop without using SSH. The goal is to modify all “hadoop-daemons.sh” with “hadoop-daemon.sh“. The “hadoop-daemons.sh” simply runs “hadoop-daemon.sh” […]
How To Modify Hadoop Log Level
By default, Hadoop’s log level is set to INFO. This can be too much for most instances, as it will generate huge log files, even in an environment with low to moderate traffic. Changing the root logger in log4j.properties file in Hadoop will not change the log level. Follow the steps below for changing the […]
Why Does a Lun World Wide ID Starts with the Number 3 in Linux dm-multipath
Question: Why Does a Lun World Wide ID Starts with the Number 3? When mapping a lun to the server with wwid -> 640xxxxxxxxxxxxxxxxxxxxxx, but from the `multipath -ll`, all wwid begin with 3 like 3640xxxxxxxxxxxxxxxxxxxxxx. # multipath -ll 3640xxxxxxxxxxxxxxxxxxxxxx dm-27 HUAWEI,XSG1 size=400G features=’1 queue_if_no_path’ hwhandler=’0′ wp=rw `-+- policy=’round-robin 0′ prio=1 status=active |- 14:0:0:28 sdbg […]
How to enable md5 Hashing in Linux
Question: How to make sure that all passwords (root and non-root) are stored as MD5 Hashing standard? NOTE: Here we are assuming that the default Hashing protocol is non MD5. Please follow the below steps in order to achieve the same: 1. Run the below command: # cat /etc/pam.d/system-auth | egrep “password|sufficient” Output would be […]
How to enable CUPS Debugging on CentOS/RHEL
Steps below will guide how to configure CUPS to produce debug information and how to capture it. Configuration 1. Open the cups configuration file /etc/cups/cupsd.conf with a text editor. # vi /etc/cups/cupsd.conf It would look something like this: MaxLogSize 0 # # “$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $” # # Sample configuration file for […]
How to Partition DM-Multipath Pseudo Devices in CentOS/RHEL
What is DM-Multipath Device-Mapper Multipath (DM-Multipath) is a Linux native multipath tool, which allows you to configure multiple I/O paths between server nodes and storage arrays into a single device. These I/O paths are physical SAN connections that can include separate cables, switches, and controllers. Multipathing aggregates the I/O paths, creating a new device that […]
How To Customize The Screensaver Options In Gnome on CentOS/RHEL 7
The Questions How to adjust the idle delay time for screensaver activation? How to lock the screen after screensaver is activated? How to mandate these settings systemwide for all users? How to disable the screensaver /screenlock? The Answer Available Dconf (gsettings) Configuration Keys – Dconf keys can be used to configure the screensaver behavior, which […]
How to create LXC container using lxcbr0 and virbr0 in CentOS/RHEL
Question: How to create an lxc container using lxcbr0 and virbr0 network interfaces? LXC uses the virtualization management service to support network bridging for containers, libvirtd uses bridge network virbr0 and lxc-net.service uses bridge of lxcbr0. To start virbr0 bridge start libvirt service and create a container using network.link as virbr0: virbr0: flags=4163 mtu 1500 […]