Archive for the tag 'Group'

Adding new User buddy to the wheel group

The wheel group is a group which limits the number of people who are able to su to root. This usually consists of a group named “wheel” and a set of users that are permitted to use the utility ’su’ in order to change to root.

Many systems, especially either commercial systems or Linux systems, come without wheel groups configured and implemented. At least one Linux distribution, comes with wheel groups preconfigured but not active. However, all or nearly all BSD based systems will come with the wheel group installed and set up.

Adding new user “buddy” to the wheel group in order to allow it to gain root access, with *NO* root privileges. That means that this user will be able to log into the server, but won’t be able to perform any root tasks until the user switches to the root user.

Once you are in SSH, you have to type the below command, the user buddy should already exist.

#/usr/sbin/usermod –G wheel buddy

Before proceeding, re-login to your server using the “buddy” account. At the SSH prompt, type “su” followed by the Enter key, and then enter in the root password. If you were successful, you should be at a root prompt:

To confirm that you are root, at the SSH prompt type the command whoami , which should display your root account.

Removing Physical Volumes from a Volume Group

DESCRIPTION

vgreduce allows you to remove one or more unused physical volumes from a volume group.

To remove unused physical volumes from a volume group, use the vgreduce command. The vgreduce command shrinks a volume group’s capacity by removing one or more empty physical volumes. This frees those physical volumes to be used in different volume groups or to be removed from the system.

Before removing a physical volume from a volume group, you can make sure that the physical volume is not used by any logical volumes by using the pvdisplay command.

If the physical volume is still being used you will have to migrate the data to another physical volume using the pvmove command. Then use the vgreduce command to remove the physical volume:

The following command removes the physical volume /dev/hda1 from the volume group my_volume_group.

# vgreduce my_volume_group /dev/hda1

It’s a good idea to run this option with –test first to find out what it would remove before running it for real.

Adding Physical Volumes to a Volume Group

To add additional physical volumes to an existing volume group, use the vgextend command. The vgextend command increases a volume group’s capacity by adding one or more free physical volumes.

The following command adds the physical volume /dev/sdf1 to the volume group vg1

vgextend vg1 /dev/sdf1

DESCRIPTION

vgextend allows you to add one or more initialized physical volumes ( see pvcreate(8) ) to an existing volume group to extend it in size.

Examples

“vgextend vg00 /dev/sda4 /dev/sdn1″ tries to extend the existing volume group “vg00″ by the new physical volumes (see pvcreate(8) ) “/dev/sdn1″ and /dev/sda4″.

« Prev