Disabling NetworkManager The following steps will disable NetworkManager service and allows the interface to be managed only by network service. 1. To check which are the interfaces managed by NetworkManager # nmcli device status This displays a table that lists all network interfaces along with their STATE. If Network Manager is not controlling an interface, […]
Archives for May 2017
CentOS / RHEL : Managing password ageing for users using chage (with practical Examples)
For security reasons, it is good practice to require users to change their passwords periodically. To configure password expiration for a user from a shell prompt, use the chage command. The basic syntax of the chage command is : # chage [option] [username] The table below lists out the command line options that can be […]
CentOS / RHEL : How to configure a user account to never expire (disable password ageing)
Question : How to configure a user account so that the password will never expire? Answer: By default passwords do not expire on user accounts. If an expiration date has been added to an account and you wish to remove it use either the passwd or chage commands to change the maximum number of days […]
CentOS / RHEL 5,6 : How to Change the timezone
Timezone configuration on Linux is usually set up at installation time. On RHEL 5 and 6, the procedure to change the Timezone configuration is as follows. The example used here is from timezone MDT to IST. The timezone can be either changed from command line or using the system-config-date command. Using system-config-date command Use the […]
How to find the inode size of an ext2/ext3/ext4 filesystem?
By using the tune2fs tool with the option, -l, the inode size of the filesystem could be seen. Using the same option, other information of the filesystem superblock can also be seen. The superblock contains information about the filesystem, such as the number of free blocks available, and the number of mounts, that may be […]
DHCP configuration file /etc/dhcp/dhcpd.conf explained
The main DHCP configuration file is /etc/dhcp/dhcpd.conf. The file is used to store the network configuration information required by DHCP clients. There is also a sample configuration file at /usr/share/doc/dhcp-[version]/dhcpd.conf.sample. # cat /usr/share/doc/dhcp*/dhcpd.conf.sample # dhcpd.conf # # Sample configuration file for ISC dhcpd # # option definitions common to all supported networks… option domain-name “example.org”; […]
CentOS / RHEL : How to configure an DHCP server
1. Install the dhcp package: # yum install dhcp 2. Copy the sample file /usr/share/doc/dhcp*/dhcpd.conf.sample. # cp /usr/share/doc/dhcp*/dhcpd.conf.sample /etc/dhcp/dhcpd.conf 3. The Sample dhcp configuration file will look as follows. # cat /etc/dhcp/dhcpd.conf Allow booting; Allow bootp; authoritative; subnet 192.168.0.0 netmask 255.255.255.0 { option routers 192.168.0.1; range 192.168.0.100 192.168.0.200; default-lease-time 21600; max-lease-time 43200; You will need […]
CentOS / RHEL : How to change SNMP community string
Question: How to change an SNMP community string in CentOS / RHEL? Answer: Here is a short note on how to change an SNMP community string and test if its working allright. 1. The below line in /etc/snmp/snmpd.conf needs to be modified to change the community string. Replace the string public or the last word […]
CentOS / RHEL : How to create new LVM based swap partition
Let see an example of increasing existing swap space by adding new LVM based swap. The example here uses the disk /dev/sdc for creating a new volume group and swap volume under it. Since we are going to use this disk, any data, if exists on it, will be lost. As root user perform the […]
CentOS / RHEL : How to add swap file
Not the best practices to add a file as swap space, but it comes handy when you have an urgent requirement of adding swap space. The post below describes steps to add swap file. Adding swap file Determine the size of the new swap file in MB and multiple by 1024 to determine the block […]