filmov
tv
Tutorial: How to Perform User and Group Operations on Linux and UNIX

Показать описание
(A special thanks to whomever originally created the lab document from which this video is derived).
Unit 3 Lab - User and Group Basics
II. Create new groups
5. Create a new group called employees, with GID 200. Use this command
groupadd -g 200 employees
6. Check the file /etc/group to confirm that you have created this new group. Use this
command: tail /etc/group
7. Now create two more new groups as follows:
sales
GID = 201
training
GID = 202
Write down the exact commands you used.
III. Create new users
8. Create the following user account:
Username = sultan
Password = Nettwerk1
Full name = "Sultan Al Hosani"
Default group = sultan
Other groups = sales, employees
Home directory = /home/sultan
Login shell = /bin/bash
UID = 600
Account never expires
Use the following two commands:
$ useradd -m -c "Sultan Al Hosani" -G sales,employees -u 600 -s /bin/bash sultan
$ passwd sultan (then enter Nettwerk1 as a password)
(No options required for primary group = sultan)
9. Create the following user account:
Username = hussain
Password = Network1
Default group = hussain
Other groups = sales, employees
Home directory = /home/hussain
Login shell = /bin/bash
Account expires on January 10, 2017
What commands did you use?
IV. Modify user accounts
10. Make the following account modifications:
Add sultan to the training group (usermod command)
Add "Hussain Al Hosani" as the comment on hussain's account (usermod command)
Lock sultan's account (passwd command)
Write down the exact commands you used.
V. Operating Systems Administration & Security
Account files
11. Display the file that contains basic information about user accounts. What command did
you use?
12. Display the file that contains encrypted passwords, showing it one screen at a time. What
command did you use?
13. Display the last 10 lines of the file that contains groups and members. What command did
you use?
VI. Check logged-in users
14. Switch to virtual terminal 2 (tty2) by pressing [Ctrl]-[Alt]-[F2]. Log in as hussain.
15. Enter the following commands and write down the output of each one:
$ whoami
$ users
16. Switch to virtual terminal 3 (tty3) by pressing [Ctrl]-[Alt]-[F3]. Log in as mark.
17. Enter the following commands and write down the output of each one:
$ id
$ who
18. Switch to virtual terminal 4 (tty4) by pressing [Ctrl]-[Alt]-[F4]. Log in as john.
19. Enter the following commands and write down the output of each one:
$ whoami
$ w
VII. End of lab
© Paul W. Poteete, 2016
Please join me:
Thank you for visiting,
Paul
#linux, #unix, #tutorial, #administration, #engineering, #beginner, #expert, #advanced, #intermediate, #training
Unit 3 Lab - User and Group Basics
II. Create new groups
5. Create a new group called employees, with GID 200. Use this command
groupadd -g 200 employees
6. Check the file /etc/group to confirm that you have created this new group. Use this
command: tail /etc/group
7. Now create two more new groups as follows:
sales
GID = 201
training
GID = 202
Write down the exact commands you used.
III. Create new users
8. Create the following user account:
Username = sultan
Password = Nettwerk1
Full name = "Sultan Al Hosani"
Default group = sultan
Other groups = sales, employees
Home directory = /home/sultan
Login shell = /bin/bash
UID = 600
Account never expires
Use the following two commands:
$ useradd -m -c "Sultan Al Hosani" -G sales,employees -u 600 -s /bin/bash sultan
$ passwd sultan (then enter Nettwerk1 as a password)
(No options required for primary group = sultan)
9. Create the following user account:
Username = hussain
Password = Network1
Default group = hussain
Other groups = sales, employees
Home directory = /home/hussain
Login shell = /bin/bash
Account expires on January 10, 2017
What commands did you use?
IV. Modify user accounts
10. Make the following account modifications:
Add sultan to the training group (usermod command)
Add "Hussain Al Hosani" as the comment on hussain's account (usermod command)
Lock sultan's account (passwd command)
Write down the exact commands you used.
V. Operating Systems Administration & Security
Account files
11. Display the file that contains basic information about user accounts. What command did
you use?
12. Display the file that contains encrypted passwords, showing it one screen at a time. What
command did you use?
13. Display the last 10 lines of the file that contains groups and members. What command did
you use?
VI. Check logged-in users
14. Switch to virtual terminal 2 (tty2) by pressing [Ctrl]-[Alt]-[F2]. Log in as hussain.
15. Enter the following commands and write down the output of each one:
$ whoami
$ users
16. Switch to virtual terminal 3 (tty3) by pressing [Ctrl]-[Alt]-[F3]. Log in as mark.
17. Enter the following commands and write down the output of each one:
$ id
$ who
18. Switch to virtual terminal 4 (tty4) by pressing [Ctrl]-[Alt]-[F4]. Log in as john.
19. Enter the following commands and write down the output of each one:
$ whoami
$ w
VII. End of lab
© Paul W. Poteete, 2016
Please join me:
Thank you for visiting,
Paul
#linux, #unix, #tutorial, #administration, #engineering, #beginner, #expert, #advanced, #intermediate, #training
Комментарии