Showing posts with the label linux

How to Reset Root Password in RHEL7

Without a doubt, one of the most powerful and essential tools a system's administrator has is the ability to gain root privileges. While it's generally a bad idea, to say the least, to perpetually operate as the root user on any given system, being able to log in as the root user on the command console is essential at times. Therefore, it's frustrating to be in the position as a system administrator if you've forgotten or otherwise lost the password and are, subsequently, unable to gain escalated privileges on a system. Since the shift to grub2, as well as other changes with the init system, the method of gaining access to a system for such low-level purposes has changed. Reboot the system, wait for the grub menu, press the letter 'E' on the keyboard to edit the menuentry. Then, scroll down to the bottom of the screen to the line starting with linux and append the space-separated kernel commands rw and init=/bin/bash before hitting the F10 key to boot

Backups in RHEL7 on XFS Filesystem

The default storage setup in a new Red Hat Enterprise Linux 7 installation is an LVM partitioning scheme with an XFS boot partition outside of the LVM scheme, and the root and home partitions comprising the main volume group on an XFS filesystem. This is a departure from the previous default filesystem type ext4 . Some important behavioral and administrative differences between the ext4 filesystem and the xfs filesystem are addressed in the RedHat Documentation, chapter 6 in the “Storage Administration Guide” specifically. The key items addressed pertain to Filesystem repair , Metadata error behavior , Quotas , Filesystem resize and Inode numbers among other things. One nice feature of the XFS filesystem is the native backup and restoration feature with the xfsdump and xfsrestore utilities, respectively. The xfsdump utility supports incremental backups to tape drives or regular file images. The incremental backups are possible due to the use of different dump levels .

Firefox--Multiple plugins Directories

There are a number of legitimate reasons why one would have multiple versions of Firefox installed on one system.  While, it's generally ill-advised to have multiple versions of the same package/software installed--as it could create resource conflicts and system hangups--recent versions of Firefox have become more stable in this type of scenario.  The Developer Edition of Firefox, for example, has an option under Preferences that specifies whether or not to "allow Firefox Developer Edition and Firefox to run at the same time" through the use of different Profiles . While this is a nice functionality, there are still some issues with the system-wide Library path and the local ".mozilla" directory in the user's home directory.  There's still an issue with installed plugins, which are in the system-wide directory "/usr/lib64/mozilla/plugins/" on a 64-bit system, not available in the second installed firefox package unless the user creates

Set Focus to Follow Mouse Cursor in GNOME 3

Install dconf-editor in RHEL or Fedora, then go to org -> gnome -> desktop -> wm -> preferences and make sure auto-raise check-box is checked on. Also, change the focus-mode to sloppy or mouse . The window focus mode indicates how windows are activated. It has three possible values; "click" means windows must be clicked in order to focus them, "sloppy" means windows are focused when the mouse enters the window, and "mouse" means windows are focused when the mouse enters the window and unfocused when the mouse leaves the window. There's a nice, detailed write-up available on . Auto Raise Delay: The time delay before raising a window if auto-raise is set to true. The delay is given in thousandths of a second. Focus Mode: The window focus mode indicates how windows are activated. It has three possible values; “click” means windows must be clicked in order to focus them, “sloppy” means windows are focused when th

wpa_supplicant and wifi in RHEL 7

If you have a desktop environment set up in Red Hat Enterprise Linux 7, chances are that you might have GNOME installed as it is the "default".  NetworkManager is pulled in as a dependency package of GNOME and it's integrated into gnome-shell in the top panel as a widget.  While NetworkManager is a great tool as it consolidates many different networking tools and facilitates the network configuration for many different use-cases, there might be instances where its broad reach becomes an obstacle rather than a benefit to system administrators.  One such instance is when dealing with network bridging . Recently I was trying to set up a network bridge on my laptop, as it's equipped with a wifi adapter and an ethernet adapter, in order to dedicate the ethernet interface to a virtual machine in Red Hat 7 --or at least to "share" it.  Bridged networking (also known as physical device sharing) is used to dedicate a physical device to a virtual machine.  So,

Install NVidia drivers in RHEL

NVidia drivers for GPUs (Video Cards) are proprietary software and, therefore, are like a thorn in the eye of the OpenSource/Linux community. Given the nature of said drivers, Linux distributions do not provide support for nVidia's drivers; however, the nouveau project is an open-source alternative to nVidia's proprietary drivers, though it's still very much in development and 3D support, while it's greatly improved in recent years, is lacking. There are two ways to get the nVidia drivers installed onto a system running RedHat: Download the binary package directly from nvidia and execute the installation procedure with sh NVIDIA-Linux- .run Install the Community Enterprise Linux Repository elrepo and install the kmod-nvidia package yum install kmod-nvidia The second method is usually preferred as, similar to rpmfusion and Fedora , they are preformated in rpm format  they can be installed/updated/uninstalled with yum package manager are optimized

fail2ban configuration in Fedora/RHEL

The configuration files in Fedora20 for fail2ban are located in the /etc directory under /etc/fail2ban/ with further sub-directories for actions, filters and jails . drwxr -xr -x . 2 root 4.0 K May 16 2014 action . d drwxr -xr -x . 2 root 4.0 K Mar 19 2014 fail2ban . d drwxr -xr -x . 2 root 4.0 K May 16 2014 filter . d drwxr -xr -x . 2 root 4.0 K Mar 19 2014 jail . d -rw -r -- r -- . 1 root 2.1 K Mar 14 2014 fail2ban . conf -rw -r -- r -- . 1 root 33 Dec 10 00 : 16 fail2ban . local -rw -r -- r -- . 1 root 14 K Dec 10 01 : 06 jail . conf -rw -r -- r -- . 1 root 16 K Dec 10 00 : 54 jail . conf . rpmnew -rw -r -- r -- . 1 root 805 Dec 10 07 : 48 jail . local -rw -r -- r -- . 1 root 1.5 K Mar 14 2014 paths -common . conf -rw -r -- r -- . 1 root 606 Mar 14 2014 paths -debian . conf -rw -r -- r -- . 1 root 649 Mar 14 2014 paths -fedora . conf -rw -r -- r -- . 1 root 1.2 K Mar 14 2014

Awesome Window Manager

The Awesome Window Manager, awesome-wm , is a tiling window manager for Linux PCs that can be used as a standalone X-session or as part of a Desktop Environment, e.g. Gnome, KDE, etc. It's a great lightweight alternative to a full-fledged Desktop Environment, and it's one of the few GUI sessions available that handles dynamic desktop-layouts on multiple monitors/displays quite well. The image below, for example, shows a PC with a built-in display and six separate desktop layouts, along with an external display with its own set of six desktop layouts.

awesome-wm Sound/Audio Fix

As a Window Manager, awesome-wm 's lightweight composition results in a more-responsive user experience as compared to a full-fledged Desktop Environment like Gnome, for example. However, depending on your needs, lightweight might also be described as stripped down ; your expectations of what simply "works" (or should work) right out the gate in a graphical desktop session, without any user input, may be misguided, as I found mine to be today after attempting to watch a YouTube video with no apparent sound. Puzzled by the strange effect, I clicked on another, different, random video, restarted my browser, cleared the cache, tested the audio output with VLC media player to ascertain the persistence of the problem. It seemed inconceivable to me that I hadn't noticed this behavior before, especially, because I had been using awesome-wm for years it seemed! Alas, 'twas so afterall. Here's how I managed to fix the problem with Audio playback on m

Commentary on LinuxJournal's Message to Hardware Vendors

Android vs. iOS (iPhone)

It seems to me that Android has created a powerful niche somewhere between Microsoft/Windows and Mac/iOS. As we all know, the integration between- and smoothe operation of Apple Hardware and its own Software( Along with Steve Jobs’ vision/leadership) have propelled the company and the brand from the brink of extinction to the most powerful and most profitable company on the planet (Q3/Q4 of Fiscal year 2012).  Microsoft/Windows had dominated the market by licensing its software to manufacturers who could “assemble” the hardware categorically and load the proprietary software to create a generic-for lack of a better term-product for the masses in a timely/cost-effective manner. Though, the money saved on research/integration/development meant those PCs usually couldn’t even use the technology within to its FULL potential. Meanwhile, in the current market trends–with Mobile devices surpassing Desktops/Laptops–Android has emerged as an Open Source, customizable Operating System to

Interview with SystemD developers

(translated from Systemd's goal is to standardize Linux, +Lennart Poettering told us three years ago. For quite some time, already, the project that was started by Poettering and +Kay Sievers has become more than simply an init-service; with the upcoming switch to  +systemd   by the Debian and Ubuntu Linux distributions, it seems that systemd's goal to standardize Linux has been achieved, according to the developers in the interview with In the meantime, the only missing OS from among the biggest and most well-known Linux distributions is  +Slackware all others have either implemented systemd already, offer a solution for its use, or have begun the changeover to systemd.  That's something that the developers could never have imagined, though did hope; ultimately, they remain convinced of the advantages that their software provides. In the last four years they were both heavily criticized, though, as Sievers put it, that criticism c