Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. [root@redhat ~]# groupadd teachers
  2.  
  3. [root@redhat ~]# useradd rcwang
  4. [root@redhat ~]# useradd jjli
  5. [root@redhat ~]# useradd hcyang
  6. [root@redhat ~]# useradd ycc
  7.  
  8. [root@redhat ~]# usermod -aG rcwang teachers
  9. [root@redhat ~]# usermod -aG teachers rcwang
  10. [root@redhat ~]# usermod -aG teachers jjli
  11. [root@redhat ~]# usermod -aG teachers hcyang
  12. [root@redhat ~]# usermod -aG teachers ycc
  13.  
  14. [root@redhat ~]# fdisk /dev/vdb
  15.  
  16. Welcome to fdisk (util-linux 2.29.2).
  17. Changes will remain in memory only, until you decide to write them.
  18. Be careful before using the write command.
  19.  
  20. Device does not contain a recognized partition table.
  21. Created a new DOS disklabel with disk identifier 0x5bb34cbc.
  22.  
  23. Command (m for help): n
  24. Partition type
  25. p primary (0 primary, 0 extended, 4 free)
  26. e extended (container for logical partitions)
  27. Select (default p): p
  28. Partition number (1-4, default 1): 1
  29. First sector (2048-20971519, default 2048):
  30. Last sector, +sectors or +size{K,M,G,T,P} (2048-20971519, default 20971519):
  31.  
  32. Created a new partition 1 of type 'Linux' and of size 10 GiB.
  33.  
  34. Command (m for help): p
  35. Disk /dev/vdb: 10 GiB, 10737418240 bytes, 20971520 sectors
  36. Units: sectors of 1 * 512 = 512 bytes
  37. Sector size (logical/physical): 512 bytes / 8192 bytes
  38. I/O size (minimum/optimal): 8192 bytes / 8192 bytes
  39. Disklabel type: dos
  40. Disk identifier: 0x5bb34cbc
  41.  
  42. Device Boot Start End Sectors Size Id Type
  43. /dev/vdb1 2048 20971519 20969472 10G 83 Linux
  44.  
  45. Command (m for help): w
  46. The partition table has been altered.
  47. Calling ioctl() to re-read partition table.
  48. Syncing disks.
  49.  
  50. root@ts877:~# mkfs.ext4 /dev/vdb1
  51. mke2fs 1.43.4 (31-Jan-2017)
  52. Discarding device blocks: done
  53. Creating filesystem with 2621184 4k blocks and 655360 inodes
  54. Filesystem UUID: 4fdd9417-445d-4627-b220-9214a2b9c43d
  55. Superblock backups stored on blocks:
  56. 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
  57.  
  58. Allocating group tables: done
  59. Writing inode tables: done
  60. Creating journal (16384 blocks): done
  61. Writing superblocks and filesystem accounting information: done
  62.  
  63. [root@redhat ~]# vim /etc/fstab
  64. /dev/vdb1 /csie ext4 defaults 0 0
  65.  
  66.  
  67. [root@redhat ~]# chmod 774 /csie # 設定權限:rwx rwx r--
  68. [root@redhat ~]# chmod g+s /csie # SetGID 重要!!!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement