0% found this document useful (0 votes)
3 views3 pages

Solaris Administrator's Quick Reference: Setup Printer

This document provides instructions and file locations for configuring various aspects of a Solaris system, including: 1) Network settings such as hostname, IP addresses, and default routes can be configured in files like /etc/inet/hosts, /etc/hostname, and /etc/defaultrouter. 2) Printers can be added and configured using the lpadmin command and settings stored in /etc/lp/printers. 3) File sharing is configured through /etc/vfstab for local mounts and /etc/dfs/dfstab for exported NFS file systems.

Uploaded by

vijaycse
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Solaris Administrator's Quick Reference: Setup Printer

This document provides instructions and file locations for configuring various aspects of a Solaris system, including: 1) Network settings such as hostname, IP addresses, and default routes can be configured in files like /etc/inet/hosts, /etc/hostname, and /etc/defaultrouter. 2) Printers can be added and configured using the lpadmin command and settings stored in /etc/lp/printers. 3) File sharing is configured through /etc/vfstab for local mounts and /etc/dfs/dfstab for exported NFS file systems.

Uploaded by

vijaycse
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Change hostname/IP address /etc/inet/hosts; /etc/auto_home

/etc/net/*/hosts; Automount home (indirect) map, sample as follow


Solaris Administrator’s /etc/hostname.{hme0|le0}
/etc/nodename;
/etc/defautrouter;
/etc/[Link]
#### mount home directory #####
jialong bluebear:/export/home/jialong
Quick Reference
/etc/auto_direct
Author: Jialong He Setup Printer Automount direct map, sample as follow
Email: Jialong_he@[Link] Local printer #### mount /usr/local from a server ####
[Link] lpadmin –p prt_name –v /dev/ecpp0 -D “description” –T PS /usr/local bluebear:/usr/local
-I postscript
User Initialization /etc/[Link]
parallel port: {/dev/ecpp0 | /dev/bpp0} Volume manager configuration.
/etc/profile ($HOME/.profile) serial port: {/dev/term/a | /dev/term/b}
sh, bash, ksh system wide (per user) init share [options] pathname
Printer connected to a computer export NFS file systems to other computers.
(system wide init has no effect in CDE environment). lpadmin –p prt_name –s host_name –T unknow –I any
/etc/.login ($HOME/.login) mount [options] filesrv:/pathname /mnt
Network capable printer Mount remote file system. For security, when possible, mount
csh, tcsh system wide (per user) init lpadmin –p prt_name –m netstandard –v /dev/null
(system wide init has no effect in CDE environment). system as readonly and nosuid.
-D “description” -o protocol={bsd | tcp} /etc/[Link]
$HOME/.cshrc -o dest=prtIP:9100 ←port needed for tcp protocol Removable disk configuration.
per user csh, tcsh init (order: /etc/.login → $HOME/.cshrc → -o banner={never | optional | always}
$HOME/.login). -o timeout=300
/usr/dt/config/Xsession.d/[Link] Sendmail Configuration
system wide init for CDE environment (a script in Xsession.d). /etc/mail/[Link]
$HOME/.dtprofile Misc printing commands sendmail configuration file.
per user init for CDE environment. /etc/mail/aliases
/etc/skel/* lpadmin –d prt_name aliases file. Must run newaliases after modifying aliases file.
Templete files ([Link], [Link], [Link]) copied to set prt_name as the default printer. Configure a mail server
new user’s home directory. lpstat –d Generate new configuration file
show current default printer. cd /usr/lib/mail/cf
lpstat –p prt_name –l cp [Link] [Link]
Network Configuration show prt_name configuration. /usr/ccs/bin/make [Link]
/etc/defaultdomain lpstat –t
NIS/NIS+ domain name. show all printer status. Test new mail configuration file
/etc/defaultrouter /usr/lib/sendmail –C [Link] –v email_address </de/null
IP address of the default router.
/etc/[Link]
Environment variables
Install configuration file
Internet domain name, name server and search order. cd /etc/mail
An example of [Link] LPDEST or PRINTER
User default printer. cp [Link] [Link]
domain [Link] cp /usr/lib/[Link] [Link]
_default in /etc/[Link]
nameserver [Link]
system default printer.
search [Link] pkill –HUP sendmail
/etc/[Link] Anti-spam
specifying information source from files, NIS, NIS+, or DNS. Disable banner make sure FEATURE(access_db) is in [Link]
/etc/hostname.{hme0|le0} edit file /etc/lp/interfaces/prt_name create /etc/mail/access with something like
Ipv4 hostname. nobanner=yes
/etc/nodename [Link] REJECT
IPv6 hostname. Common setting stored in file [Link] RELAY
/etc/inet/hosts /etc/lp/printers/prt_name/configuration spam@[Link] 550 Spammers shan't see sunlight here
Host name file (/etc/hosts is a link to this file). /usr/lib/lp/model
/etc/inet/netmasks makemap hash /etc/mail/access < /etc/mail/access
TCP/IP subnet masks.
/etc/inet/protocols File Sharing
Network protocols. /etc/vfstab CDE configuration
/etc/inet/services File mount table (local or NFS). $HOME/.dtprofile
Network service name and port number. /etc/dfs/dfstab per user CDE init file, gemerated from
/etc/notrouter File sharing table (NFS server). /{usr|etc}/dt/config/[Link].
create this file prevent [Link] or [Link] from starting at /etc/auto_master $HOME/.dt/dtwmrc
boot time. Automounter master map, sample as follow desktop manager configuration file (pop-up menu when right
/etc/inet/[Link] #### Master map for automounter #### click mouse). From /{usr|etc}/dt/config/C/[Link]
Internet super daemon configuration file. /home auto_home -nobrowse /usr/dt/appconfig/types/C/[Link]
/- auto_direct -ro copy to $HOME/.dt/types/[Link] and modify it.
$HOME/.dt/sessionetc /etc/[Link] [Link] ([Link])
per user CDE session start file (script with execute perm). pluggable authentication configuration file. Apache web server configuration file. ([Link])
$HOME/.dt/sessionexit /etc/[Link] [Link]
per user CDE exit file (script with execute permission). power configuration. Samba (window server) configuration file. ([Link])
/{usr | etc}/dt/config/C/Xresources /etc/[Link]
control attribute of login screen, for example, to disable session BSD printer configuration.
menu, uncomment following line
Miscellaneous Commands
/etc/magic
Dtlogin*session_menus*sensitive: False used by “file” command to determine file type. SUN patch files and freeware
[Link]
/{usr | etc}/dt/config/C/[Link] /etc/security/*
[Link]
session resource, for example, to disable automatic screen lock, security audit related files.
set timout to 0 Forget root password
/etc/[Link]
boot –s cdrom
dtsession*lockTimeout: 0 system log daemon configuration file.
find out root partition with “format” command
$HOME/.dt/sessions/{current | home} /etc/notrouter
mount /dev/dsk/c0t0d0s0 /mnt (suppose c0t0d0s0 is root part.)
current (home) session files. specify this host is not a router.
edit /mnt/etc/shadow
/{usr | etc}/dt/config/Xconfig
configuration file for login screen (dtconfig), after change use Disable auto-logout feature for tcsh
dtconfig –reset Default info for various programs Put following line in .cshrc or .tcshrc
/etc/default/power unset autologout
/usr/dt/config/Xstartup
this script run after user login but before user session. power management parameters. edit /etc/inittab
/etc/default/Solregis remove sc:234:respawn:/usr/lib/saf/sac –t 300
/usr/dt/config/Xaccess
put DISABLE=1 to disable solaris registration screen. disable serial device (modem) login.
Control access to Xserver.
/etc/default/su showmount –e host_name
/usr/dt/bin/Xsession
settings for “su” command. show export file systems on host_name.
start CDE session
/etc/default/sys-suspend rpcinfo –p host_name
/usr/dt/config/Xsession.d/*
users permitted to put system in suspend mode. check RPC services on host_name.
Scripts auto executed by Xsession.
/etc/default/passwd ldd program
usr/dt/config/[Link]
minimum password length. show what dynamic libraries needed by program.
start OpenWindow session.
/etc/default/login LD_LIBRARY_PATH is the search path for dynamic libraries.
/usr/dt/config/Xreset
Command executed after the session end. login related settings, put CONSOLE=/dev/console useradd –d homedir –u UID –g GID –c “comment” –s shell
disable root login by telnet (rlogin). add new user account.
/usr/dt/bin/dtconfig –e|-d|-kill
-e|-d: enable (disable) autostart login server. /etc/default/init man foo | col –b > [Link]
time zone, CMASK (default 022) save manual page for command “foo” in pure text.
-kill: kill dtlogin and all its child process.
/etc/default/kbd pkgadd –d pkgfile
$HOME/.dt/icons
KEYBOARD_ABORT=disable add solaris package file.
$/{usr|etc}/dt/appconfig/icons/C
default icons search path. boot –r
Reconfiguration system after adding new hardware.
Application Configuration who –r
System Configuration /etc/ssh2/ssh2_configure ($HOME/.ssh2/ssh2_config) show current run level.
SSH client system wide (per user) configuration file. volcheck –v
/etc/passwd, /etc/shadow, /etc/group
user account information. /etc/ssh2/sshd2_config ($HOME/.ssh2/sshd2_config) check if new floppy/cdrom is inserted.
SSH server system wide (per user) configuration file. fuser –u [-k] /cdrom
/etc/ftpusers
users NOT allowed to use FTP. Setup SSH2 to accept hostbased authtication Show which program is using the cdrom (or floppy).
(1) Server side /usr/sbin/eeprom
/etc/system
In sshd2_config, includes hostbased, like this show settings in eeprom.
Kernel parameters
AllowedAuthentications hostbased, publickey, password /usr/sbin/prtconf –vb
Example: disable execution in stack
In /etc/hosts, use client’s full qualified domain name (FQDN). show system information.
set noexec_user_stack=1
In .rhosts (.shosts), also use FQDN, make user these files are find / -type f –perm -4000 –user root –print
set noexec_user_stack_log=1
owned by that user and not writeble by other users. find set UID to root program.
set maxuprc = 128 # maximum no. of user process
Copy client’s [Link] to server’s /etc/ssh2/knownhosts and m64config –res 1024x768x75 –depth 24
set sys:coredumpsize = 0 # prevent core dump
name it as [Link] (e.g., [Link]- set screen resolution, color depth for M64 frame buffer.
/etc/[Link], ($HOME/.rhosts)
[Link]). (ffbconfig on Ultra -60)
system wide (per user) trust hosts.
(2) Client side fsck –F ufs –y /dev/rdsk/c0t0d0s0
/etc/motd, (/etc/issue)
In ssh2_config, includes hostbased authentication, like this file system check, answer “y” to all questions.
message after (before) login.
AllowedAuthentications hostbased, publickey, password xv –root –quit [Link]
/etc/shells
Also need to set DefaultDomain keyword, like set CDE screen background.
allowed shell program.
DefaultDomain [Link] /etc/init.d/script {start | stop}
/etc/initab
run level configuration. run a script in /etc/init.d directory.
/usr/local/lib/[Link] newfs –v /dev/rdsk/c0t0d0s6
/etc/rc{S, | 1 | 2 | 3 | 5 | 6}.d
system wide PINE configuration, overwrite by $HOME/.pinerc construct new file system after format.
scripts for different run levels.
/usr/local/lib/[Link] /usr/sbin/sys-unconfig
/etc/bootparams
system wide PINE configuration, NOT overwrite by ~/.pinerc reconfiguring the system.
[Link] configuration file.
patchadd [options] patch
apply patch to system.
ufsdump 0uf /dev/rmt/0 /
backup of all files.
ufsrestore xf /dev/rmt/0 etc/[Link]
restore [Link] file from backup
install_cluster –q -nosave
install recommended patch cluster.
ndd
set TCP/IP parameters
eeprom
change settings in eeprom, like
eeprom security-mode=full

Shell Programming
if-then-else foreach do-while
sh, bash, ksh sh, bash, ksh sh, bash, ksh
if condition; then for key in list… ; do while condition; do
action_1; else actions; done actions; done
action_2; fi
csh, tcsh csh, tcsh
csh, tcsh foreach key (list) while (condition)
if (condition) then actions actions
action_1; end end
else
action_2; Rename files
endif foreach i (*)
mv $i $[Link]
end

You might also like