Home HomeLinux. .Mandrake.10.Podręcznik.Użytkownika.[eBook.PL]Kirch O, Dawson T Linux. Podręcznik administratora sieciLinux administracja sieciami zaawansowane ( 554 strony )Teach yourself linux in 24 hoursLinux Installation and Getting StartedMetaloznawstwo Głowacka MariaEncyclopedia of networking[3 2]Erikson Steven Wspomnien JasnowidzEco Umberto Imie RozyJ.M. Bochenski Wspolczesne metody myslenia
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • moje-waterloo.xlx.pl
  •  

    [ Pobierz całość w formacie PDF ]
    .This is accom-plished by creating a group account, assigning permissions rights to this account,and then adding the appropriate individual users to the group.An example of thismight be a payroll department for a company.By creating a Payroll group, you canassign the users who are responsible for payroll activities to a group with accesspermissions to payroll files.Furthermore, it s probably not a good idea to allowothers access to the payroll system.Because the payroll system is most likely com-prised of many systems, you can cut down on the overhead of assigning permis-sions by using groups instead of enabling access to each system for each individualuser.Creating users4.1 Create and delete users 144881-6 ch09.F 11/12/01 8:30 AM Page 294Part IV &' Administration294Some users can be created during the installation of the Linux operating system;however, you will need to add more users as the system is used.You can add moreusers by employing the addusercommand.To use the addusercommand, youmust have administrative rights.With the addusercommand, you can choose fromseveral different options to assign to created users  these options are shown inTable 9-1.Table 9-1Options for adduserOption Description-c comment The new user s password file comment field.-d The new user will be created using as thevalue for the user s login directory.-e YYYY-MM-DD The date the user account will be disabled in the format year-month-date (2001-12-31)-f # Sets the number of days after a password expires until theaccount is permanently disabled.-1 disables the feature and 0disables the user account when the password expires.-g The group name or number of the user s initial login group.-G A list of groups of which the user is also a member.-m The user s home directory will be created if it does not alreadyexist.The -k option copies the files contained in skeleton_dir tothe home directory; if this option is not used, then the files in/etc/skel will be used.-M The user s home directory will not be created even if the defaultis to create the home directory.-n A group having the same name, because the user will not becreated.This is distribution-specific.-r Used to create a system account and requires the -m option tocreate a home directory.-p The encrypted password as returned by the password generator.-s Assigns the as the user s login shell.-u The numerical value of the user s ID must be unique, unlessthe -o option is used.The default is to the next available numbergreater than 99.No Options The useradd command displays the current default values.--help Provides program help. 144881-6 ch09.F 11/12/01 8:30 AM Page 295Chapter 9 &' General Linux Administration295With these switches and options, you can use the addusercommand to create newusers.The following files are used to support the addition of users:&' /etc/passwd: Contains user account information&' /etc/shadow: Contains secure user account information&' /etc/group: Contains group information&' /etc/default/useradd: Contains the default information for adding users&' /etc/login.defs: Contains the system-wide default login settingsThe most common command used to add a user is adduser.In enter-prise environments, however, the command often includes the -p to assign an initialpassword and -g to assign a group.The addusercommand is an important tool inthe administration of users.Change user information4.2 Modify existing users (e.g., password, groups, personal information)You can change user information by using several tools.The tools that are mostoften used are chfn, chsh, and usermod.Linux administrators use these commandsto provide basic user management in the Linux environment.The usermodcommandThe usermodcommand is the command most often used to administer useraccounts.This command uses the -c, -d, -e, -f, -g, -p, -s, and -u options that wereshown previously in Table 9-1 and the following options shown in Table 9-2.Table 9-2Options for usermodOption Description-l Changes only the user s account name to.Thisdoes not change the home directory of the user.-L Locks the user s password, effectively disabling the password.-U Unlocks the user s password, reverses the -L option.--help Provides program help. 144881-6 ch09.F 11/12/01 8:30 AM Page 296Part IV &' Administration296The usermodcommand provides access to not only the settings available when cre-ating an account, but also to the settings for changing an account name and lockingand unlocking an account.These settings make the usermodcommand an excellenttool for basic administration of the user account.The chfncommandAnother tool that is often used to provide basic user account administration ischfn.The chfncommand is used to change the fingerinformation provided bythe /etc/passwdfile.This file provides four fields that are displayed when thefingercommand is used to identify a user.Use the fingercommand to gather information based on a user name.The com-mand can accept user names and return real information about that user.The Linux fingercommand displays four pieces of information: full name, loca-tion, work phone, and home phone.This information can be useful to identify usersby using the fingercommand.The command employs options to assign this infor-mation, as shown in Table 9-3.Table 9-3Options for chfnOption Description-f Assigns the full name of the user.-o Allows the assignment of the location or office room.-p Assigns the office phone number.-h Assigns the home phone number.-v Prints version information.-u Prints usage message.--help Provides program help.The chfncommand allows administrators to provide basic real world informationabout a user to the fingercommand. 144881-6 ch09.F 11/12/01 8:30 AM Page 297Chapter 9 &' General Linux Administration297The chsh commandUse the change shell command, or chsh, to change a user s default shell only.Thisallows only the shell to be changed and uses the options shown in Table 9-4.Table 9-4Options for chfnOption Description-s Specifies the login shell.-l Lists the available shells in /etc/shells.-v Prints version information.-u Prints usage message.--help Provides program help.Deleting users4.1 Create and delete usersUse the userdelcommand to remove users who no longer require access to a sys-tem.The userdelcommand doesn t have many options.The format of this com-mand is userdel, where is the user s account name.The only optionfor the userdelcommand is -r, which, when implemented, removes the user s filesin the home directory and the user s mail spool.Files are often not removed in orderto allow restoration of a user and access to the user s files if necessary.Creating groups4.3 Create, modify and delete groupsYou can create groups by using the groupaddcommand.The creation of a groupuses the options shown in Table 9-5. 144881-6 ch09.F 11/12/01 8:30 AM Page 298Part IV &' Administration298Table 9-5Options for groupaddOption Description-g The is a numerical value assigned to the group.0-499 are normallyused for system accounts; therefore, 500 and above are used for newlycreated groups.-r Instructs the groupaddcommand to add a system account.-f Prevents groupadd from exiting with an error when a group already existson the system.-o Allows non-unique to be used with the -g option.--help Provides program help.The syntax for the groupaddcommand is: groupadd [ Pobierz całość w formacie PDF ]

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