RedHat/CentOS/Fedora system password cracking

Source: Internet
Author: User

 

(1) RedHat/CentOS/Fedora system password cracking

1. Press E in the grub option menu to enter the editing mode.

2. Add S (or Single) to the last line of the kernel editing)

3. Press B to start to single-user mode.

4. Run the following command

# Mount-t proc/proc

# Mount-o remount, rw/

# Passwd

# Sync

# Reboot

(2) Debian linux system password cracking

1. In the grub option menu 'debian GNU/Linux,... (recovery mode) ', press e to enter the editing mode.

2. Edit the ro single at the end of the kernel line and change it to rw single init =/bin/bash. Press B to restart.

3. Run the following command

Root @ (none) # mount-

Root @ (none) # passwd root

Root @ (none) # reboot

(3) Freebsd system password cracking

1. boot to enter the boot menu

2. Select each item (Press 4) to enter the single-user mode.

3. Enter a command column.

Root @ # mount-

Root @ # fsck-y

Root @ # passwd (password change command)

Root @ # root (username to crack the password)

Enter new unix password:

Root @ # init 6 (restart)

(4) Solaris system password cracking

1. Select the solaris failasfe item in the grub option menu

2. The system prompts Do you wish to have it mounted read-write on/? [Y, n,?] Select y

3. Enter the single-user mode.

4. Enter the following command: passwd

Root @ # init 6 (restart)

(5) NetBsd system password cracking

1. Boot: When a prompt symbol appears and the last five seconds start, type the following command:

> Boot-s (command for entering single-user mode)

2. In the following prompt symbols

Enter pathname of shell or RETURN for sh:

Press Enter.

3. type the following command:

# Mount-

# Fsck-y

4. Use passwd to change the root password.

5. Use the exit command to enter the multiplayer mode.

(6) SUSE system password cracking

1. restart the machine. After the grub boot interface appears, add init =/bin/bash to the linux Startup options, by passing the init =/bin/bash parameter to the kernel, the OS runs bash before running the login program, and the command line appears.

2. Wait for a moment (none) #: command line.

3. Enter mount-n/-o remount. rw indicates that the root file system is remounted to read/write. With the read/write permission, you can use the passwd command to change the password.

4. Enter the passwd command to reset the password.

5. After the modification, remember to use mount-n/-o remount. ro sets the root file system to the original state.

LVM

1: Basic Concepts

LVM: Logical Volume Manager, which is the Logical Volume Manager.

1) Physical Volume-PV (Physical Volume)

2) Volume Group-VG (Volume Group)

3) Logical Volume-LV (Logical Volume)

4) Physical zone PE (Physical Extent): The minimum storage unit for allocation

5) Logical region -- LE (Logical Extent)

6) Volume Group description Area-VGDA (Volume Group Descriptor Area): created when a physical Volume is created using pvcreate

2: During installation of Red Hat Linux 9, LVM is provided in graphical mode. grub cannot identify files in logical volumes, so/boot cannot use logical volumes.

3: Command LVM operation process

Create an LVM-type partition --> Create a physical volume --> use a physical volume to create a volume group --> Create a logical volume in a volume group --> --〉

1) Create an LVM-type partition: first create a primary partition and then change its partition type;

Fdisk-l

Fdisk/dev/sda, enter "n" to create a partition, "p" to view the partition, "t" to change the partition type, and "w" to save the modification.

2) create a physical volume: The volume can be created only on the new LVM partition.

Pvdisplay/dev/sda2

Pvcreate/dev/sda2

3) create a volume group using a physical volume: The volume group can contain multiple physical volumes or use only one physical volume.

Vgcreate myVG/dev/sda2

4) create a logical volume in the volume group

Lvcreate-L 10 M-n myLV1 myVG

// Note: FC5 automatically creates a VG "/dev/VolGroup00" when grouping, and divides the VG into two LV: "LogVol00" and "LogVol01 ", mount boot to LogVol00 and mount the root to LogVol01. therefore, the following steps are required to expand the root size:

5) Add a new physical volume to the volume group

Vgextend VolGroup00/dev/sdb // Add a hard disk sdb

6) expand the capacity of the logical volume lvextend-L + 40G/dev/VolGroup00/LogVol01 // extend LogVol01, that is, "/", to 40G

7) how to adjust the file system size in a logical volume?

After the capacity of the logical volume is expanded, you need to adjust the size of the file system based on the existing file system types in the logical volume.

1) ext2 File System: First uninstall the ext2 file system, then run the resize2fs command to mount the file system, or use the e2fsadm command that comes with the lvm software package.

2) reiserfs File System

You can use the resize_reiserfs command to adjust the file system size.

4: Device Files in LVM

Physical volume device file: the name of the device corresponding to the physical volume is displayed in the output of the pvscan command;

Volume group Device File: The vgscan command can be used to query the existing volume groups in the system. The volume group name corresponds to the directory under "/dev/", and it is in the directory "/etc/lvmtab. d/"has the information file of the volume group. Each volume group corresponds to a file with the same name.

Logical volume device file: the existing logical volume in the lvscan command query system. The logical volume device file is located in the volume group of the logical volume.

5: physical volume command

Pvscan: searches all disks of the system for existing physical volumes.

Pvdisplay physical volume full path name: used to display properties of the specified physical volume

Pvdata physical volume full path name: used to display the volume group description area (VGDA) information of the physical volume, mainly used for debugging purposes

Pvchage: used to change the physical volume allocation permission settings

Pvchange -- allocation n/dev/hdb1 // set the physical volume "hdb1" to allocable

Pvchange-x y/dev/hdb1 // set physical volume "hdb1" to unallocable

Full path name of the pvcreate device: used to create a physical volume

Pvmove Source Physical Volume full path name [target physical volume full path name]: for etc: pvmove/dev/hdb2; used to transfer data of a physical volume in the same volume group to another physical volume.

6: volume group command

Vgscan detects all disks in the system, searches for volume group definitions, and creates files in the file "/etc/lvmtab" and directory "/etc/lvmtab. d /".

Vgck [volume group name] checks the consistency of the volume group description area (VGDA) Information in the volume group.

Vgdisplay [volume group name] displays the attributes of a volume group, including logical volumes, physical volumes, and their sizes.

Vgrename [source volume group name] [new volume group name] (or original volume group name path, new volume group name path) is used to rename an existing volume group.

Vgchange changes the corresponding attributes of a volume group.

Vgmknodes re-creates the volume group directory of the existing volume group and the device files in the directory.

Vgcfgbackup [volume group name] is used to back up vgda information in the volume group to a file in the "/etc/lvmconf" directory.

Vgcfgrestore-n volume group name physical volume full path name: restores the vgda information of the specified physical volume from the volume group backup file. After this command is executed, run the vgmknodes command to recreate the device files of the volume group and logical volume.

Vgcreate volume group name physical volume full path name: Use the specified physical volume to create a volume group.

Vgremove volume group name: Used to delete a specified volume group. The deleted volume group cannot contain logical volumes and cannot be active.

Vgextend volume group name physical volume full path name: Used to add one or more initialized physical volumes to the specified volume group

Vgreduce volume group name physical volume full path name: used to remove one or more unused physical volumes from the volume group

Vgmerge target volume group name source volume group name: Used to merge two existing volume groups. The two volume groups must have the same PE size and the source volume group is not active;

Full path name of the physical volume in the new volume group of the existing vgsplit volume group: detaches one or more physical volumes from the volume group to the new volume group;

Vgexport volume group name: Output A volume group that cannot be recognized by the system. The volume group should be non-active;

Physical volume in the vgimport volume group name volume group: Used to input an output volume group so that the current system can recognize the volume group.

7: logical volume command

Lvscan

Full path name of lvdisplay logical volume

Lvrename old name new name

Lvchange [-a | C | p | r | y/n] modifies attributes of a specified logical volume, such as availability, continuity, read/write permission, and pre-read.

E2fsadm-L + |-logical volume increase/decrease logical volume full path name: used to change the size of the ext2 partition, which can be mounted or not mounted

Lvcreate-L logical volume size-n logical volume name volume group name: used to create a logical volume in the specified volume group, the logical volume parameters that can be specified include the name and size of the logical volume to be created.

Lvremove logical volume full path name: used to move a logical volume from a volume group unless it is an active logical volume

Lvextend-L | -- size + logical volume size incremental logical volume full path name

Lvreduce-L | -- size + logical volume reduction full logical volume path name

8: logical volume management commands

Lvmdiskscan detects logical volume management information in hard disks and partitions

Lvmchange-R: resets the logical volume manager and sets all volume groups and logical volumes to be inactive!

Lvmsadc [full log file path name] collects read/write statistics of the logical volume manager and saves them to the specified file;

Lvmsar [full log file path name] reads and reports the read/write statistics of the logical manager from the log file generated by the lvmsadc command.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.