[ Pobierz całość w formacie PDF ]
.2.Use the proper commands to view the current mounted directories anddevices.3.Mount a diskette using a method that verifies that the mount was successful.4.Un-mount the diskette.5.Attempt to un-mount a system directory; take note of what can and can t bedismounted.6.Repeat as often as possible trying several of the options available.Answers to Chapter QuestionsChapter Pre-test1.The creation of a user normally requires a user name, password, group assign-ment, user rights, and real world information, such as name, location, andcontact numbers.2.You need to know who is to be assigned to the group, what files and directo-ries the group needs access to, and a name for the group.3.The addusercommand is the most often used command line method, andseveral GUI programs are available to create and manage users, such askuser for KDE. 144881-6 ch09.F 11/12/01 8:30 AM Page 325Chapter 9 &' Study Guide3253254.The groupaddcommand is the most often used command line method ofadding groups to a Linux system.Several GUI programs are available forcreating and managing groups,5.The common directories in Linux are /, /bin, /boot, /dev, /etc, /home, /lib,/mnt, /opt, /proc, /root, /sbin, swap, /tmp, /usr, /usr/local and /var.6.The common commands are ls, cd, cp, mv rm, touch, mkdir, and rmdir.7.The common commands used to mount and manage file systems are mount,umount, du, df, mkfs, and fsck.8.The use of chmod, chown, and chgrp are used to identify and manage filepermissions9.Normally, all commands used to manage the Linux system require root access.10.Normally, users have no rights to manage users, groups, directories, file sys-tems, or permissions.Assessment Questions1.A.The command adduser johnshould be used to add the user name johnfor Johnny Jones.The others won t create the proper account.For review,see the  Creating users section.2.B.The command adduser -e 2005-12-25 contractoris used to add theuser name contractor that is disabled on December 25, 2005.The others willfail to create the user correctly.For review, see the  Creating users section.3.C.The chfn command is used to provide information for the finger com-mand.The chmodand chgrpcommands are used for access rights and thechshcommand is used to change the login shell.For review, see the  Changeuser information section.4.D.The command userdel -r is used to remove a user and theuser s home directory, including the user s files and mail spool.The -r optionperforms this task; the -d and -h options are not valid.For review, see the Deleting users section.5.B.The files modified when performing any action on a group are /etc/groupand /etc/gshadow.The others are not the typically files on a Linux system.For review, see the  Creating groups section.6.A.The groupdelcommand will delete a group from a Linux system.Thegroupmodwill modify a group and the others are not typical programs usedto perform group management.For review, see the  The groupdelcommandsection. 144881-6 ch09.F 11/12/01 8:30 AM Page 326Chapter 9 &' Study Guide3267.D.The command that displays the current directory is the print workingdirectory or pwdcommand.The others won t display the current directory.For review, see the  The pwdand cdcommands section.8.C.The command cd /etc/X11will move the user to the /etc/X11directory.The others fail due to the use of ls or a missing /.For review, see the  The pwdand cdcommands section.9.C.The ls -lcommand will display a long listing format, including accessrights.The -a option provides all entries, including all those normally not dis-played; -n provides a list in long format but no access rights; and -i prints thei-node number for each file.For review, see the  The lscommand section.10.C.The command [john@dhcppc1 john]$ cp /home/john/myfile /tmp/will move the file named myfile from the home directory of user john to the/tmpdirectory.The others won t perform the task.For review, see the  Thecpcommand section.11.B.The correct format for the move command is mv [options] [source][destination].The use of is not used.For review, see the  Themvcommand section.12.B.The command used to remove a file interactively is rm -idue to the use of the -i option.The other options don t provide an interactiveenvironment.For review, see the  The rmcommand section.13.C.The x option is used to allow execute only if the file is a directory.The r(read), w (write), and x (execute) don t perform this task.For review, see the Setting File and Directory permissions section.14.A.The command chown --verbose user2 /tmp/newfilewill display confir-mation of the change of ownership of a file from user to user2.The -v and -foptions don t provide confirmation and the chgrp command won t changeownership of the file for a user.For review, see the  The chowncommandsection.15.C.The command chgrpis used to change only the group ownership of a file.The others provide a different service.For review, see the  The chgrpcommand section.16.B.The command mount -f /mnt/win_c2won t mount the file system/mnt/win_c2due to the -f option.The other options won t fake the mountcommand.For review, see the  Mount section.17.D.The file system most likely to require the -t option is smbfs.The other filesystems are normally mounted automatically by the mount command.Forreview, see the  Mount section.18.C.The command umount -v /mnt/floppywould un-mount a diskette andprovide verification of the dismount.The other options don t provide verifica-tion.For review, see the  Umount section. 144881-6 ch09.F 11/12/01 8:30 AM Page 327Chapter 9 &' Study Guide32732719.C.The command du -c -s /home/userwill display the total size of all files,without listing the files.The -c and -s options are required to provide the fea-tures needed.For review, see the  The duCommand section.20.C.The command df -mwill display the available space of each partition inMB.The -M is not used and the ducommand doesn t provide the correct infor-mation.For review, see the  The df Command section.Scenarios1.You can move the users to a group called remove by using the chgrpcom-mand to remove any group affiliations, and then remove all their files by usingthe userdel -r.2.The best way to justify the replacement or the denied replacement is to usethe dfcommand to verify the free space on the sales manager s current drive. 144881-6 ch09.F 11/12/01 8:30 AM Page 328 154881-6 ch10.F 11/12/01 8:30 AM Page 329C H A P T E R10Linux Terminals10and Shells&' &' &' &'&'4.7 Perform administrative tasks while logged in as root, or byusing the su command (e.g., understand commands that aredangerous to the system)&'4.9 Describe and use the features of the multi-user environment(e.g., virtual terminals, multiple logins)&'4.10 Use common shell commands and expressions&'4.11 Use network commands to connect to and manageremote systems (e.g., telnet, ftp, ssh, netstat, transfer files,redirect Xwindow)&'4.17 Manage and navigate the Graphical User Interface(e.g., menus, xterm)&'4.18 Program basic shell scripts using common shell commands(e.g., grep, find, cut, if) 154881-6 ch10.F 11/12/01 8:30 AM Page 330Part IV &' Administration330CHAPTER PRE-TEST1.Is Linux a multi-user operating system?2.Can multiple users simultaneously access a Linux system?3.How does Linux provide multi-user access on the same terminal?4.Can Linux provide Ethernet-based terminals?5.Can Linux monitor remote connections?6.What shells are commonly used in Linux?7 [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • czarkowski.pev.pl
  •