There are several ways in which user account can be locked or disabled. The posts discusses few of the most widely used ways. 1. Lock the password To lock a users account use the command usermod -L or passwd -l. Both the commands adds an exclamation mark (“!”) in the second field of the file […]
Archives for September 2017
UNIX / Linux : how to force user to change their password on next login after password has reset
The Ask How to require a user to change their password the next time they login? User must be force to change the password for the first time only after the password has been reset. 1. Using chage command This can be done using the chage command with -d option. As per man page of […]
crontab error : “You (user) are not allowed to access to (crontab) because of pam configuration.”
Issue crontab -l command fails with the following error. # crontab -l You (user) are not allowed to access to (crontab) because of pam configuration. You would see below logs in the cron log file /var/log/cron: Sep 19 11:01:01 geeklab crond[125479]: (user) PAM ERROR (Permission denied) Sep 19 11:01:01 geeklab crond[125479]: (user) FAILED to authorize […]
CentOS / RHEL : How to mount filesystems using UUID
The device can be identified by a full path to a block device (for example, /dev/sda3) , a universally unique identifier (UUID; for example, UUID=3bf2d836-be7d-4e69-a1ff-4ffd2661edcf) , or a volume label (for example, LABEL=home). The device node name of a disk (/dev/sda, /dev/hda, /dev/vda, etc.) may change in some situations. For example, after switching cables around […]
CentOS / RHEL : How to add a new Physical Volume to an existing Volume Group
You might want to add new PV in existing VG so extend an LV or to grow your VG. In this example, a new 10Gg block device (whether a partition, LUN or new physical disk) is added to an existing Volume Group (VG) containing one fully utilized 10Gb Physical Volume (PV). Before proceeding, run the […]
CentOS / RHEL : How to resize (extend) existing Physical Volume (PV)
To resize or extend a Volume group you can either add a new Physical Volume or extend an existing Physical volume. In the latter case, VG automatically recognizes the new increase size whereas in the former case you have to extend the VG using vgextend. Let’s see an example of resizing the existing PV to […]
CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on LVM device
Backup all data on filesystem to be resized Resizing a filesystem and underlying devices is dangerous and potentially destructive if performed incorrectly. Repartitioning devices is similarly destructive and may result in complete data loss. Before proceeding, backup the contents of the filesystem/device to be resized. Resizing (extending) non-root EXT3/4 filesystem on LVM device 1. Example […]
CentOS / RHEL : Resize (reduce) non-root EXT3/4 filesystem on non-LVM device (hard disk partition)
Backup all data on filesystem to be resized Resizing a filesystem and underlying devices is dangerous and potentially destructive if performed incorrectly. Repartitioning devices is similarly destructive and may result in complete data loss. Before proceeding, backup the contents of the filesystem/device to be resized. Resize (extend) of non-root filesystem On a hard disk partition […]
CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on non-LVM device (hard disk partition)
Feasibility of filesystem resize (extend) The underlying device (partition in our case) upon which an EXT3/4 filesystem resides must first be resized before the filesystem can be resized. Accordingly, the feasibility of underlying device resize must first be established to determine whether filesystem resize is possible. The following conditions/scenarios make it feasible to resize (extend) […]
CentOS / RHEL 4 : How to install and configure FTP server (vsftpd)
1. To set up an FTP server, make sure the vsftpd package is installed. To check if the vsftpd package is installed, use the command below: # rpm -q vsftpd 2. Install the vsftpd server rpm from the Red Hat Network by running the below command: # up2date vsftpd Fetching Obsoletes list for channel: el4_i386_latest… […]