in the Linux system Build File system, build user, modify user group, reset user password
Experimental background: User and Space
user name: BOSSWLB Group and satellite group: BOSSWLB home directory: /BOSSWLB shellbash
Space: New ( add / enlarge ) 5G unlock password reset abcd1234
1th: Create a new file system
Let's take a look at the existing file system on the system, as shown in:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8E/57/wKiom1i-HarwW8PuAAAUTjymZGM387.png-wh_500x0-wm_ 3-wmp_4-s_4120404609.png "title=" 11.PNG "alt=" Wkiom1i-harww8puaaautjymzgm387.png-wh_50 "/>
the following starts by adding a piece of size 5G new disk, use any of the following commands to scan to a new disk:
1. #echo '---' >/sys/class/scsi_host/host0/scan
2. #rescan-scsi-bus.sh (centos6.7 does not seem to have this command )
3.reboot
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/8E/55/wKioL1i-Hc-ixeyEAAAGC4u7H_E609.png-wh_500x0-wm_ 3-wmp_4-s_2631097170.png "title=" 222.PNG "alt=" wkiol1i-hc-ixeyeaaagc4u7h_e609.png-wh_50 "/>650) this.width=650;" Src= "https://s4.51cto.com/wyfs02/M00/8E/55/wKioL1i-HhKRgwTAAAAxohUxqxI290.png-wh_500x0-wm_3-wmp_4-s_853069764. PNG "title=" 33.PNG "alt=" Wkiol1i-hhkrgwtaaaaxohuxqxi290.png-wh_50 "/>
this /dev/sdb just add the new plate. We will now start partitioning, formatting and finally creating a new file system, as shown in the following:
before we do this, we need to make sure that the system has lvm2-devel.i686 This bag! Use command:Yum list
|grep LVM see below, no words please install First, command: Yum install–y lvm2-devel.i686 ( I am a 32-bit )
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/8E/57/wKiom1i-HnGDychRAAAlKtLVqjw872.png-wh_500x0-wm_ 3-wmp_4-s_2836067060.png "title=" 44.PNG "alt=" Wkiom1i-hngdychraaalktlvqjw872.png-wh_50 "/>
the creation and naming of PV,VG,and LV, as shown in:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8E/55/wKioL1i-Hszi6CywAAAg8mlKuck367.png-wh_500x0-wm_ 3-wmp_4-s_2767596574.png "title=" 55.PNG "alt=" Wkiol1i-hszi6cywaaag8mlkuck367.png-wh_50 "/>
format, command:mkfs.ext4/dev/vg_bosswlb/lv_bosswlb, the result is as follows:
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8E/55/wKioL1i-Hw3iN-VxAABBU3hS6s0319.png-wh_500x0-wm_ 3-wmp_4-s_2265623765.png "title=" 66.PNG "alt=" Wkiol1i-hw3in-vxaabbu3hs6s0319.png-wh_50 "/>
Before mounting the partition, create the file mount directory, command:mkdir/bosswlb, change the host of the Mount directory, the owning group, the command is as follows:
Chown–r BOSSWLB:BOSSWLB/BOSSWLB
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/8E/55/wKioL1i-HzuT02JdAAAikUCd_98129.png-wh_500x0-wm_ 3-wmp_4-s_3959289936.png "title=" 77.PNG "alt=" Wkiol1i-hzut02jdaaaikucd_98129.png-wh_50 "/>
2nd: Next we'll create the username: BOSSWLB , Group and subsidiary groups: BOSSWLB Home directory: /BOSSWLB Shell:bash, define uid=620,gid=620
The command is as follows:
Useradd-u 620-s/bin/bash-d/bosswlb bosswlb
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8E/55/wKioL1i-H32A20a3AAAOEdQLRbs486.png-wh_500x0-wm_ 3-wmp_4-s_3517829119.png "title=" 88.PNG "alt=" Wkiol1i-h32a20a3aaaoedqlrbs486.png-wh_50 "/>
When generating bosswlb This home directory, the system will error, the content is as follows:
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/8E/58/wKiom1i-H6ji14ksAAAFetQG2WI815.png-wh_500x0-wm_ 3-wmp_4-s_2288918571.png "title=" 99.PNG "alt=" Wkiom1i-h6ji14ksaaafetqg2wi815.png-wh_50 "/>
processing method:cp–rvf/etc/skel/. /bosswlb/ can do it.
Set up Users BOSSWLB password, the command is as follows:
passwd bosswlb (in Root user)
3rd: Finally, we mount the newly created file system to the /BOSSWLB , the command is as follows:
Mount/dev/vg_bosswlb/lv_bosswlb/bosswlb
automatic mount on boot, you can add it to the configuration file /etc/fstab , as follows:
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/8E/58/wKiom1i-H83yvsDDAAAtZooLLWE648.png-wh_500x0-wm_ 3-wmp_4-s_2032925901.png "title=" 100.PNG "alt=" Wkiom1i-h83yvsddaaatzoollwe648.png-wh_50 "/>
Build file system on Linux system, build user, modify user group, reset user password