Wednesday, July 06, 2005

Cancel Print Jobs

List jobs first:
1) lpstat
Then, cancel:
2) cancel

Disable/Enable a Printer

1) To disable:
/usr/bin/disable HPLaser
2) To enable:
/usr/bin/enable HPLaser
Make sure to give full path, since bash shell has a clashing enable command.

Show Current Print Queue on Printer "moon"

lpstat -o moon

Three ways to check Print Scheduler status

1) pgrep -l lpsched
2) svcs -l print/server
3) lpstat -r

List Default Printer

lpstat -d

Allow/Deny Users to Print

By default, all users are allowed to print.
1) This will allow only sergey to print:
lpadmin -p HPLaserJet6MP -u allow:monalisa.phy.vanderbilt.edu\!sergey
2) The following line will be added to /etc/lp/printers/HPLaserJet6MP/users.allow :
monalisa.phy.vanderbilt.edu!sergey
3) If the file
/etc/lp/printers/HPLaserJet6MP/users.allow
exists, then users.deny file is ignored.

Printer Settings Directory

/etc/lp/printers/

List Printer Info

lpstat -lp

Tuesday, July 05, 2005

Stopping a Service

Find proper FMRI name:
1) svcs -a | grep ssh <-- outputs network/ssh:default
Stop the service (disable temporary):
2) svcadm disable -t network/ssh:default
Make sure that the service is stopped:
3) svcs -l network/ssh:default | grep enabled <-- outputs: enabled false (temporary)

Enabling a Service

Find the proper FMRI name:
1) svcs -a | grep rlogin <-- output is network/login:rlogin
Check if the service is enabled:
2) svcs -l network/login:rlogin | grep enabled <-- output is true or false
Use -r to recursively enable all dependencies:
3) svcadm enable -r network/login:rlogin

Disabling a Service

If the service has dependents, you won't be able to disable it. Check dependents of rlogin:
1) svcs -a | grep rlogin <-- output is svc:/network/login:rlogin
2) svcs -D network/login:rlogin
3) svcadm disable network/login:rlogin

List Service Status

1) svcs -a | grep sendmail
Then, omit svc:/ and use:
2) svcs -l network/smtp:sendmail

Sunday, July 03, 2005

Default init Levels

/etc/inittab does not have initdefault entry anymore. Instead, svcadm configures run levels. Scripts multi-user-server.xml, multi-user.xml, and single-user.xml are located in /var/svc/manifest/milestone/

Saturday, July 02, 2005

Reconfigure SPARC Hardware

reboot -- -rv
-- <-- tells reboot that the following flags are going to be parameters for boot PROM command
-r <-- tells boot command to reconfigure devices (same as creating /reconfigure file)
-v <-- verbose

Friday, July 01, 2005

Display Hard Disk Data

1) format
2) partition
3) print
Slice 2 is the size of the HD.