System Administration Guide, Volume 1
Total Page:16
File Type:pdf, Size:1020Kb
System Administration Guide, Volume 1 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, CA 94303-4900 U.S.A. Part Number 805-7228–10 February 2000 Copyright 2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California 94303-4900 U.S.A. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, docs.sun.com, AnswerBook, AnswerBook2, SunOS, Solstice, Solstice AdminSuite, Solstice DiskSuite, Solaris Solve, Java, JavaStation, DeskSet, OpenWindows, NFS and Solaris are trademarks, registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. DLT is claimed as a trademark of Quantum Corporation in the United States and other countries. The OPEN LOOK and SunTM Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements. RESTRICTED RIGHTS: Use, duplication, or disclosure by the U.S. Government is subject to restrictions of FAR 52.227–14(g)(2)(6/87) and FAR 52.227–19(6/87), or DFAR 252.227–7015(b)(6/95) and DFAR 227.7202–3(a). DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. Copyright 2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, Californie 94303-4900 Etats-Unis. Tous droits réservés. Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l’utilisation, la copie, la distribution, et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelque moyen que ce soit, sans l’autorisation préalable et écrite de Sun et de ses bailleurs de licence, s’il y en a. Le logiciel détenu par des tiers, et qui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié par des fournisseurs de Sun. Des parties de ce produit pourront être dérivées du système Berkeley BSD licenciés par l’Université de Californie. UNIX est une marque déposée aux Etats-Unis et dans d’autres pays et licenciée exclusivement par X/Open Company, Ltd. Sun, Sun Microsystems, le logo Sun, docs.sun.com, AnswerBook, AnswerBook2, SunOS, Solstice, Solstice AdminSuite, Solstice DiskSuite, Solaris Solve, Java, JavaStation, DeskSet, OpenWindows, NFS et Solaris sont des marques de fabrique ou des marques déposées, ou marques de service, de Sun Microsystems, Inc. aux Etats-Unis et dans d’autres pays. Toutes les marques SPARC sont utilisées sous licence et sont des marques de fabrique ou des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d’autres pays. Les produits portant les marques SPARC sont basés sur une architecture développée par Sun Microsystems, Inc.Quantum Corporation riclame DLT comme sa marque de fabrique aux Etats-Unis et dans d’autres pays. L’interface d’utilisation graphique OPEN LOOK et SunTM a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés. Sun reconnaît les efforts de pionniers de Xerox pour la recherche et le développement du concept des interfaces d’utilisation visuelle ou graphique pour l’industrie de l’informatique. Sun détient une licence non exclusive de Xerox sur l’interface d’utilisation graphique Xerox, cette licence couvrant également les licenciés de Sun qui mettent en place l’interface d’utilisation graphique OPEN LOOK et qui en outre se conforment aux licences écrites de Sun. CETTE PUBLICATION EST FOURNIE “EN L’ETAT” ET AUCUNE GARANTIE, EXPRESSE OU IMPLICITE, N’EST ACCORDEE, Y COMPRIS DES GARANTIES CONCERNANT LA VALEUR MARCHANDE, L’APTITUDE DE LA PUBLICATION A REPONDRE A UNE UTILISATION PARTICULIERE, OU LE FAIT QU’ELLE NE SOIT PAS CONTREFAISANTE DE PRODUIT DE TIERS. CE DENI DE GARANTIE NE S’APPLIQUERAIT PAS, DANS LA MESURE OU IL SERAIT TENU JURIDIQUEMENT NUL ET NON AVENU. Please Recycle Contents About This Book 27 1. Managing Users and Groups Topics 33 2. Managing User Accounts and Groups (Overview) 35 What’s New in Managing Users and Groups? 35 What Are User Accounts and Groups? 36 Guidelines for Managing User Accounts 37 Name Services 37 User (Login) Names 37 User ID Numbers 38 Passwords 40 Password Aging 41 Home Directories 42 User’s Work Environment 42 Guidelines for Managing Groups 43 Tools for Managing User Accounts and Groups 44 What You Can Do With Admintool 47 Modify User Accounts 47 Delete User Accounts 48 Add Customized User Initialization Files 48 3 Administer Passwords 48 Disable User Accounts 48 Where User Account and Group Information Is Stored 49 Fields in the passwd File 49 Fields in the shadow File 52 Fields in the group File 53 Customizing a User’s Work Environment 56 Using Site Initialization Files 57 Avoid Local System References 58 Shell Features 58 Shell Environment 59 The PATH Variable 63 Locale Variables 64 Default File Permissions (umask)65 Examples of User and Site Initialization Files 66 Example—Site Initialization File 67 3. Setting Up and Maintaining User Accounts and Groups (Tasks) 69 Becoming Superuser (root) 70 r How to Become Superuser (root) 70 Setting Up User Accounts Task Map 71 User Information Data Sheet 71 r How to Customize User Initialization Files 72 r How to Start Admintool 74 r How to Add a Group 75 r How to Add a New User Account 76 r How to Share a User’s Home Directory 77 r How to Mount a User’s Home Directory 79 Maintaining User Accounts Task Map 80 4 System Administration Guide, Volume 1 ♦ February 2000 r How to Modify a Group 81 r How to Delete a Group 82 r How to Modify a User Account 82 r How to Disable a User Account 84 r How to Change a User’s Password 85 r How to Change Password Aging for a User Account 86 r How to Delete a User Account 88 Solaris User Registration 89 Accessing Solaris SolveSM 89 Troubleshooting Solaris User Registration Problems 90 r How to Restart Solaris User Registration 91 r How to Disable User Registration 91 4. Managing Server and Client Support Topics 93 5. Managing Server and Client Support (Overview) 95 What Are Servers and Clients? 95 What Does Support Mean? 96 Overview of System Types 96 Servers 97 Standalone Systems 98 JavaStation Client 98 6. Shutting Down and Booting a System Topics 99 7. Shutting Down and Booting a System (Overview) 101 What’s New in Shutting Down and Booting a System? 101 Booting a System Over the Network With DHCP 102 IA: Booting From CD-ROM Without the Solaris Boot Diskette 102 Where to Find Shutting Down and Booting Tasks 102 Shutting Down and Booting Terminology 103 Guidelines for Shutting Down a System 103 Contents 5 Guidelines for Booting a System 104 Performing a Reconfiguration Boot 104 When to Shut Down a System 105 When to Boot a System 106 8. Run Levels and Boot Files (Tasks) 109 Run Levels 109 r How to Determine a System’s Run Level 110 The /etc/inittab File 111 Example—Default inittab File 112 What Happens When the System Is Brought to Run Level 3 113 Run Control Scripts 115 Using a Run Control Script to Stop or Start Services 116 r How to Use a Run Control Script to Stop or Start a Service 116 Adding a Run Control Script 117 r How to Add a Run Control Script 117 Disabling a Run Control Script 118 r How to Disable a Run Control Script 118 Run Control Script Summaries 119 9. Shutting Down a System (Tasks) 123 When to Shut Down the System 123 How to Shut Down a System 124 When to Turn Off Power to Devices 125 Notifying Users of System Down Time 125 r How to Determine Who Is Logged in to a System 126 r How to Shut Down a Server 126 r How to Shut Down a Standalone System 130 r How to Turn Off Power to All Devices 132 10. SPARC: Booting a System (Tasks) 133 6 System Administration Guide, Volume 1 ♦ February 2000 SPARC: Using the Boot PROM 134 r SPARC: How to Switch to the ok Prompt 134 r SPARC: How to Find the PROM Release for a System 134 r SPARC: How to Change the Default Boot Device 134 r SPARC: How to Reset the System 137 SPARC: Booting a System 137 r SPARC: How to Boot a System to Run Level 3 (Multiuser State) 138 r SPARC: How to Boot a System to Run Level S (Single-User State) 139 r SPARC: How to Boot a System Interactively 140 r SPARC: How to Boot a System Over the Network 142 r SPARC: How to Boot a System for Recovery Purposes 143 r SPARC: How to Stop the System for Recovery Purposes 145 SPARC: Forcing a Crash Dump and Rebooting the System 146 r SPARC: How to Force a Crash Dump and Reboot the System 146 r SPARC: How to Boot the System With the Kernel Debugger (kadb) 147 11.