15 Sun System Administration TOC

advertisement
15
Sun System Administration
TOC
Table 1
/etc/passwd File Fields
Field Name
Description
Username
X
Uid
Gid
Unique username
Locator for users encrypted password
user identification number—used to define user system security
group identification number—used to define the security group to which the
user belongs
Holds additional information about the user or user account
Directory that the user has been assigned for storing resources (e.g., files
or programs)
Defines the users default login shell (e.g., sh, csh, ksh)
Comment
home_dir
login_shell
Table 2
/etc/shadow File Fields
Field Name
Description
Username
Password
Lastchg
Min
Max
Warn
Inactive
Unique username
13 character encrypted string—users password
Date password was last changed
Minimum days required between password changes
Maximum days the password is valid
Number of days the user is warned of password expiration
Number of days the account can be inactive (no login). If left blank the
account will always be active
Expiration of the account should be set for temporary or contract workers
Not in use
Expire
Flag
Table 3
Reserved Solaris™ UIDs
UID
Description
0
1– 99
60001
60002
65534
Root or superuser
Daemons and system maintenance processes
Special user access nobody, used in specific maintenance activities
Special user access noaccess, used in the same way as nobody
Special user access nobody4, used for backward Solaris operating system compatibility.
Table 4
GID Parameters
Field Name
Description
Groupname
Password
Gid
User_list
Symbolic name of the group (maximum of 8 characters)
Not used in Solaris 8, carry over from previous Solaris operating systems
Unique numerical number
Comma separated list of users
TOC
Table 5
useradd or usermod Parameters
Option
Parameter Name
Description
-c
comment
User comment
-d
pathname
Path for user home directory
-g
groupname or GID
Default groupname or group ID for the user
-e
expire
Expiration for the user account
-f
inactive
Maximum inactivity period for a user account
-u
UID
UID to use for the user
-s
shell
Default login shell
-l
newname
Used to change user name
Table 6
passwd Parameters
Option
-f
-x
-w
-n
-l
Parameter Name
Description
username
days username
days username
min username
username
Force the user to change password at next logon
Number of days the password is valid
Number of days before the password expires
Number of days a user has to wait to change their password
Locks the specified user account
Table 7
init Actions
Action
Description
boot
bootwait
initdefault
off
ondemand
powerfail
powerwait
respawn
sysinit
wait
Initialization of a full reboot
Transition from single-user to multi-user system
Default run level (on all systems)
Ensures process termination
Similar to re-spawn
State when a power failure is detected
Waits for process to terminate
Ensures specified process are running
Safeguard to allow administrator to specify run level
Starts a process and waits until it’s started
TOC
Table 8
Solaris Run Levels
Run Level Init State
Type
Description
Shutdown system to safely power off system
Access to user files with user logins
Normal operations, multiple users except the
NFS daemon does not start
Normal operation with NFS daemon started
Currently not in use
Shutdown system to safely power off system
with automatic power off if available
Shutdown system and reboot to multi-user
state
Start as single user system with all resources
available
0
1
2
Power Down
Administrative
Multi-user
Power-down
Single-user
Multi-user
3
4
5
Multi-user with NFS
Alternative Multi-user
Power Down
Multi-user
Multi-user
Power-down
6
Reboot
Reboot
Single-user
Single-user
s or S
Table 9
ps Parameters
Parameter Name
-a
-e or - d
-c
-f or - l
-g or -G
-j
-p
-s
-t
-u
Description
Frequently requested processes
All processes
Processes in scheduler format
Complete process information
Group information
SID and PGID
Processes for a specific process
Session leaders
Specific terminal process information
Specific user process information
Table 10
Network Layers
Network Layers
Layer Function
Application
Presentation
Session
Application data
Transport
Network
Host to host communications
Data Link
Physical
Network access
TOC
Table 11
IP Address Classes and Values
IP class
Prefix bits
Number of networks
Suffix bits
Number of hosts
A
B
C
7
714
21
126
16384
2097152
24
16
8
16777214
65532
254
Table 12
TCP Port Numbers
Port Number
Service Name
7
21
22
23
25
514
80
echo
ftp
ssh
telnet
smtp
shell
http
Description
Echo’s back from a remote host
Used to control the File Transfer Protocol (FTP)
Encrypted communications with remote systems
Terminal access to remote systems
Mail transfer protocol
Executing programs on remote systems
Web server
Table 13
Network Commands
Tool
Description
arp
Address Resolution Protocol (ARP) is a cache table that is updated based on the
presence of MAC address (network card physical address) in broadcast traffic.
Tests the reach ability of remote systems. It uses ICMP, an echo request to test
round trip connectivity.
You must run this as the root user. Snoop will monitor all network traffic passing by
the system it is running on. The interface will be running in promiscuous mode
to monitor all network traffic. You should contact your network administrator
before you run snoop to ensure you will not be violating privacy policies.
ping
snoop
TOC
Table 14
FTP Command Options
FTP Command
Description
binary
cd
close
delete
debug
dir
disconnect
form
get
help
ls
mget
mkdir
mode
open
put
pwd
quit
rename
rmdir
send
status
type
verbose
?
Set file transfer type to binary
Change remote working directory
Terminate current FTP session (don’t exit from client)
Delete specified file
Set debugging mode to on
List contents of remote directory
Terminate current FTP session and exit client
Set file transfer type to binary or ASCII
Download specified remote file
Help with command usage
List contents of remote directory
Get multiple files from remote system
Make directory on remote system
Set transfer mode to binary or ASCII
Connect to a remote system
Upload a file to a remote system
Print the current working directory
Terminate FTP session and exit
Rename specified file
Remove directory on remote system
Upload a file to the remote system
Show the current status of the FTP session
Set file type for file being transferred.
Echo detail information to screen
Print help on local system
Table 15
/dev Directory
/dev
Description
/dev/console
/dev/null
/dev/hme
/dev/ttyn
/dev/dsk
Console device
Discarded output
Network interface device
Terminal devices attached to the system
Files for disk partitions
Partition Number
Directory
Table 16
Disk Partition
0
1
2
3
4
5
6
7
/ - Root level directory
Server swap space
Whole disk
/export
Client swap space
/opt
/usr
/export/home
TOC
Table 17
Physical Disk
Disk Area
Description
Platter
Magnetic disk that turns on a shaft.
Cylinder
A cylinder refers to the location of all the drive read and write heads, typically
accessing multiple tracks.
Track
This refers to one of the concentric circles of data on disk media.
Block
A specific area within a track that data is written to.
Table 18
UFS Disk Segments
Disk Segment
Description
Superblock
Contains information on disk geometry, free blocks, and inodes. Multiple
copies are made to ensure reliability.
Inode
One inode per file. Ownership, time stamp, size and links are kept in this file.
Data Block
Data for the file being stored. The size of the block depends on how the
disk was initialized (e.g., 512K block).
Table 19
Format Menu Commands
Menu Item
Description
Disk
Type
Partition
Current
Format
Repair
Label
Analyze
Defect
Backup
Verify
Save
Inquiry
Volname
Quit
Select the disk you want to format
Define the type of disk your are formatting
Define the partition table
Describe the current disk (disk name)
Format and analyze the disk
Repair defective sectors
Provide the label name for the disk
Do a surface analysis of the disk
Defect management list (blocks)
Search for backup labels
Read and display labels
Save the new disk partition definitions
Show vendor product and revision
Define eight character volume name
Leave format menu
Table 20
Mount Options
Mount Option
Description
rw
ro
nosid
remount
Mount device with read-write capability
Mount device with read-only capability
Eliminates use of user or group identifier bits
Remount an already mounted device
TOC
Download