Adapted from the lpadmin man page, for an HP JetDirect printer:
> pfexec lpadmin -p lp01 -v /dev/null -m netstandard -o dest=lp01.example.com:9100 -o protocol=tcp -T PS -I postscript
> pfexec lpset -a banner=never lp01
> pfexec lpadmin -d lp01
> pfexec enable lp01
> pfexec accept lp01
YMMV; adjust as you see fit:
svcadm disable svc:/network/nfs/mapid:default
svcadm disable svc:/network/nfs/cbd:default
svcadm disable svc:/network/nfs/status:default
svcadm disable svc:/network/nfs/nlockmgr:default
svcadm disable svc:/network/rpc/rstat:default
svcadm disable svc:/application/x11/xfs:default
svcadm disable svc:/network/finger:default
svcadm disable svc:/network/ftp:default
svcadm disable svc:/network/login:rlogin
svcadm disable svc:/network/nfs/rquota:default
svcadm disable svc:/network/nfs/client:default
svcadm disable svc:/network/rpc/rusers:default
svcadm disable svc:/network/rpc/cde-ttdbserver:tcp
svcadm disable svc:/network/shell:default
svcadm disable svc:/network/telnet:default
svcadm disable svc:/network/cde-spc:default
svcadm disable svc:/application/management/seaport:default
svcadm disable svc:/application/management/snmpdx:default
svcadm disable svc:/application/management/dmi:default
svcadm disable svc:/system/webconsole:console
svcadm disable svc:/application/print/ipp-listener:default
To use pfexec similarly to sudo, use “usermod” to give the account the “Primary Administrator” profile:
# usermod -P’Primary Administrator’ aleonard
“aleonard” will now be able to preface commands with “pfexec” to run them as root, similar to sudo when configured not to prompt for a password.
References: Less known Solaris features: pfexec
Configure ‘/usr/lib/mail/cf/sendmail.mc’ to meet your needs; for example, to use the access_db and mailertable features:
divert(0)dnl
VERSIONID(`@(#)sendmail.mc 1.11 (Sun) 06/21/04′)
OSTYPE(`solaris8′)dnl
DOMAIN(`generic’)dnl
FEATURE(access_db, `hash -o -T /etc/mail/access’)
FEATURE(mailertable, `hash -o /etc/mail/mailertable’)
MAILER(`local’)dnl
MAILER(`smtp’)dnl
The new ’sendmail.cf’ can be built in ‘/usr/lib/mail/cf/sendmail.mc’ by running ‘make’ as root. Copy the new ’sendmail.cf’ file to ‘/etc/mail’ and restart sendmail by running:
# svcadm [...]
Use “devfsadm”; from the man page:
devfsadm(1M) maintains the /dev namespace. It replaces the previous suite of devfs administration tools including drvconfig(1M), disks(1M), tapes(1M), ports(1M), audlinks(1M), and devlinks(1M).
References: Adding a Hard Drive to Solaris 10
By default, in RHEL, nscd is configured to have a persistent cache – one that is “stored on the disk and therefore survive[s] a nscd restart or e.g. machine reboot” according to the nscd.conf man page.
To flush the cache, you must run nscd with the “-i” flag instead of simply restarting it:
sudo [...]
Edit the following files as appropriate:
/etc/hosts
/etc/nodename
/etc/hostname.<interface>
/etc/defaultrouter
Reboot to apply the changes, or run:
# svcadm restart network/physical
Here for my reference; adapt for your convenience:
# for snapshot in `zfs list -H -t snapshot -r /opt/datastore | egrep ‘2009\-0[1-8]‘ | awk ‘{print $1}’`; do zfs destroy $snapshot; done
Steps for creating an XFS partition on /dev/sdc which encompasses the entire disk. (LVM is not used in this example. Post written using Scientific Linux 5.3, but should be relevant to any RHEL clone with XFS support.)
Partition the disk using fdisk; we want the standard Linux partition id of “83″, so no need [...]
If you want to inspect files in an RPM without installing it, use rpm2cpio piped to cpio:
rpm2cpio file.rpm | cpio -id
Note that this will create a (local) directory tree under which the extracted files will be placed. In other words, expect the files to be extracted under a newly created “usr” directory or similar.