Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet142/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   138   139   140   141   142   143   144   145   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

username
and would be given csh as their login shell?
4. Using useradd, provide the instruction needed to create a new account for Chad 
Wackerman using all of the defaults.
5. Using useradd, provide the instruction needed to create a new account for Chester 
Thompson using all of the defaults except giving his account a login shell of /bin/csh.
6. Using useradd, provide the instruction needed to create a new account for Terry 
Bozzio using all of the defaults except giving his account a home directory of /home/
musicians/
username
and adding him to the group musicians.
7. Using useradd, provide the instruction needed to create a new account for Adrian 
Belew whose starting home directory will obtain its contents not from /etc/skel but 
from /etc/skel2.


386

Linux with Operating System Concepts
8. Under what circumstances might you choose to use the -N option for useradd?
9. What is wrong with the following useradd instruction?
useradd –c Frank Zappa –m zappaf
10. What is wrong with the following useradd instruction?
useradd –m –o underwoodi
11. Using useradd, provide the instruction needed to create a new account for the soft-
ware audacity, which will have its own home directory of /var/media/audacity, a login 
shell of /sbin/nologin, and no private group account.
12. By default, the account expiration date is set to 

1 indicating that there should not 
be an initial expiration date. You want to change this so that the expiration date is 
automatically set for new users to be December 31, 2018. How can you do this?
13. Modify the account creation script from Section 9.2.3 of this chapter as follows:
• All entries of the text file of users will be listed as Lastname Firstname Major
• If the Major is CSC, the student is assigned the shell tcsh instead of bash.
14. Modify the account creation script from Section 9.2.3 of this chapter as follows:
• All entries of the text file of users will be listed as Lastname Firstname Type
• Type is either Faculty or Student. All home directories are placed in either /home/
faculty/
username
or /home/student/
username
based on the value of Type.
15. Modify the account creation script from Section 9.2.3 of this chapter as follows:
• All entries of the text file of users will be listed as Lastname Firstname Role
• Role will be Administrator, Database, or Network. If Administrator, add this user 
to the group management. If database or network, add the user to the group tech-
nical. If database, also add the user to the group oracle.
16. In the account creation script from Section 9.2.3 comes the following instruction. 
Explain what this instruction does and how it works.

=
‘egrep –c $username /etc/passwd‘
17. You forget to specify an expiration date for a new user, martinb. You want his account 
to expire on June 1, 2020. How can you do this using usermod?
18. Repeat #17 using chage.
19. Examine /etc/passwd. What are the home directories established for these users?


User Accounts

387
a. root
b. bin
c. lp
d. mail
e. halt
20. Examine /etc/passwd. What login shell is specified for the following users?
a. root
b. bin
c. sync
d. shutdown
e. mail
21. Examine /etc/group. What users are members of each of these groups?
a. root
b. bin
c. adm
d. tty
e. lp
22. With root access, examine /etc/shadow. You will find large numbers in the first 
numeric position in many of the lists. What does this number represent?
23. With root access, examine /etc/shadow. Many of the entries end with the entries 
99999:7:::. What does 99999 represent?
24. Provide a chage command for user keneallym to expire his password in 30 days, 
sending a warning 5 days in advance.
25. Provide a chage command for user underwoodr to expire her password in 90 days, 
sending a warning 10 days in advance.
26. Provide a chage command to lock the account for dukeg.
27. Provide a chage command to change the minimum time between password changes 
to 7 days for user marst.
28. Redo question 24 using the passwd command.
29. Redo question 25 using the passwd command.
30. What does it mean to lock an account using the passwd command?


388

Linux with Operating System Concepts
31. Which script creates the user’s PATH variable?
32. You want to add the directories /opt/bin and ~/myscripts to your PATH variable. How 
would you do this and in which script file would you want to place the command?
33. Which script file begins executing first, .bashrc or .bash_profile? Which of these files 
finishes executing first?
34. What permissions would a file have if you created the file after doing umask 034?
35. What permissions would a directory have if you created the file after doing umask 
015?
36. What would the setting DEFAULT_HOME
=
no in the file /etc/login.defs do?
37. How would you, as a system administrator, control the number of seconds that would 
elapse before a user can attempt to login again after a failed attempt?
38. What instruction would you use to establish the initial PATH for root? For nonroot 
users?
39. What is the difference between the module types 
auth
and 
account
in a PAM 
configuration file?
40. Assume there are four session directives for a given PAM configuration file. Three 
are listed as required and the fourth as optional. What happens if the third directive’s 
call to the given module fails? What happens if the fourth directive’s call to the given 
module fails?
41. What does the 
include
statement do in a PAM configuration file directive? In what 
way does the include statement help the system administrator?
42. Notice that /etc/shadow is not readable by anyone but root. As root, you want to give 
permission to read this file to user zappaf on the local computer. What entry would 
you add to the /etc/sudoers file to establish this?
43. Anyone in the group 

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   138   139   140   141   142   143   144   145   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish