mkisofs -R -r -v -o filename.iso filepath
cdrecord -scanbus to determine the settings for the dev= argument...
You can also try cdrecord dev=help
cdrecord -v speed=8 dev=0,4,0 -data cd_image.iso
| | -|-
or4 or1 .iso filename
isoinfo -f -R -i isofile.iso
mount -t iso9660 isofile.iso /tmp/iso -o loop
# put these in .muttrc
# This ensures your return address has the right hostname
set hostname="example.com"
#1.Tell mutt to use your IMAP INBOX as your $spoolfile:
set spoolfile={mail.example.com}INBOX
#2.Set your $folder to your IMAP root:
set folder={mail.example.com}imap
set imap_user=username
set imap_pass=whatever
# This will prompt to save read messages into a dated folder e.g. 2002-10
set mbox=+`/bin/date +%Y-%m`
# for more info see http://mutt.sourceforge.net/imap/
ServerName in a given VirtualHost containers.
ServerAlias if there is more than one name for the server
us.freedb.org cddbp 888 - freedb.freedb.org http 80 /~cddb/cddb.cgi
sysctl -w net.inet.tcp.log_in_vain=1 sysctl -w net.inet.udp.log_in_vain=1
host1# ifconfig fxp0 alias 192.168.1.12 netmask 0xffffffff or netmask 255.255.255.255 #use netmask of 255.255.255.255 if on same network as existing ip/device
host1# ifconfig fxp0 -alias 192.168.1.12
cp /etc/defaults/periodic.conf /etc/periodic.conf
change
daily_output="root"
to
daily_output="/var/log/daily.log"
and so on.
But on older systems (3.4 etc) there is no mention of periodic.conf, so just
tweak the /etc/crontab like so...
59 1 * * * root periodic daily 2>&1 >>/var/log/daily.log 30 3 * * 6 root periodic weekly 2>&1 >>/var/log/weekly.log 30 5 1 * * root periodic monthly 2>&1 >>/var/log/monthly.logsome systems have |sendmail root in the
/etc/crontab AND recognize /etc/periodic.conf
in which case you should modify /etc/crontab and remove the | sendmail root string
setenv FTP_PASSIVE_MODE 1
pkg_version -c -v
This will show the commands you can use to upgrade all the ports. It isn't perfect (it doesn't take into account
any dependencies) but it has worked for me a number of times. I usually just capture the output into a file
and step through each port one-by-one. Be sure to cvsup ports-all before embarking!
pw userdel username will only remove the user from
/etc/passwd, /etc/master.passwd and /etc/group
pw -r userdel username will also remove the user's home
dirrectory
pw usermod -n username -e 10-10-2001
pw usermod -n username -e ''
grep -v '^#' /etc/inetd.conf
pkg_version -v -c # commands to upgrade each installed port/package
pkg_version -v # show the status of installed ports/packages
a2ps -E hostmap-209or saved to a postscript filea2ps -E hostmap-209 --output=hostmap-209.ps
mpage -2 -Plp netscape.ps#2 pages per sheetmpage -4 ...to do the same directly from netscape, enter this for the "print command"mpage -2 -Plpalso -O and -E complement each other for two-sided book-style printouts eg fold&staple booklets
To set a default printer (must be done on the command line)
lpoptions -d printername
then send sighup to cupsd process id
=/etc/sysconfig/ipchains=
-A input -s (ipaddress of NFS server) -d 0/0 -j ACCEPT
portmap is NOT needed for nfs mounts (client-side)
only for nfs exports (server-side)
nfslock is NOT needed for client-side nfs mounting, but I could be wrong
exception - mutt would not work without nfslock running (rpc.statd)
CORRECTION 6/27/2002
portmap should be running for client-side or mount could hang
portmap & nfslock should be running for server-side
Here is the rule I used in /etc/sysconfig/ipchains that worked
(put before any REJECT lines)
-A input -s (ipaddress of NFS server) -d 0/0 -j ACCEPT
while ( 1 ) ;
netstat -na | grep ESTA | wc -l
sleep 1
end
or use systat -netstat
/usr/sbin/usermod -e 2001-10-01 username (or some date in the past)
/usr/sbin/usermod -e '' username
fatal: buffer_get: trying to get more bytes than in buffer
This happens when you paste the public-key into authorized_keys2 and the single
line becomes multiple lines. Use vi to join the lines or just paste from a better-equipped xterm. You can also scp .ssh/id_dsa.pub target:.ssh/authorized_keys2
if no other keys are present in the target file.
dig @10.10.10.10 example.com axfr
dig <zone> axfr +multiline
Using +multiline will ensure the zone's SOA record is more
readable, buy placing each value on a separate line (as most humans do).
dig @ns1.example.com version.bind chaos txt
sshd[7147]: warning: /etc/hosts.allow, line 28: host name/address mismatch: 192.168.1.43 != somehost.example.com
dig somehost.example.com
dig -x 192.168.1.43
$ openssl x509 -noout -text -in server.crt
The only thing about ssl-ca.0-1 that sucks is that when you run new-root-ca.sh
it DELETES your config file after you're done.
In any case, the process of renewing a self-signed certificate once it has
expired is as follows:
# cp sign-server-cert.sh renew-server-cert.sh
# cp sign-user-cert.sh renew-user-cert.sh
# patch renew-server-cert.sh < server-patch
# patch renew-server-cert.sh < user-patch
Here is the patchfile for renew-server-cert.sh, save as server-patch:
--- renew-server-cert.sh Sun Apr 23 01:29:24 2000
+++ renew-server-cert.sh Tue Aug 12 08:18:32 2003
@@ -19,6 +19,8 @@
exit 1
fi
+
+
# Sign it with our CA key #
# make sure environment exists
@@ -65,6 +67,11 @@
extendedKeyUsage = serverAuth,clientAuth,msSGC,nsSGC
basicConstraints = critical,CA:false
EOT
+
+# Revoke existing cert
+echo "CA revoking: $CERT.crt:"
+openssl ca -config ca.config -revoke $CERT.crt
+mv $CERT.crt $CERT.crt.revoked
# sign the certificate
echo "CA signing: $CERT.csr -> $CERT.crt:"
and here is the patchfile for renew-user-cert.sh, save as user-patch:
--- renew-user-cert.sh 2004-01-08 07:30:45.000000000 -0800 +++ renew-user-cert.sh 2004-01-08 07:38:29.000000000 -0800 @@ -62,6 +62,11 @@ extendedKeyUsage = emailProtection,clientAuth EOT +# Revoke the old (expired/expiring) certificate +echo "CA revoking: $CERT.crt:" +openssl ca -config ca.config -revoke $CERT.crt +mv $CERT.crt $CERT.crt.revoked + # sign the certificate echo "CA signing: $CERT.csr -> $CERT.crt:" openssl ca -config ca.config -out $CERT.crt -infiles $CERT.csr
note that this script (renew-server-cert.sh) must be run with both the csr and crt in the current working directory.
Here is a real-life example...
$ ./renew-server-cert.sh mail.foster.cc
CA revoking: mail.foster.cc.crt:
Using configuration from ca.config
Enter pass phrase for ./ca.key:
Revoking Certificate 02.
Data Base Updated
CA signing: mail.foster.cc.csr -> mail.foster.cc.crt:
Using configuration from ca.config
Enter pass phrase for ./ca.key:
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'US'
stateOrProvinceName :PRINTABLE:'Washington'
localityName :PRINTABLE:'Seattle'
organizationName :PRINTABLE:'Mark Foster'
organizationalUnitName:PRINTABLE:'Secure Mail Server'
commonName :PRINTABLE:'mail.foster.cc'
emailAddress :IA5STRING:'root@foster.cc'
Certificate is to be certified until Aug 11 15:27:33 2004 GMT (365 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
CA verifying: mail.foster.cc.crt <-> CA cert
mail.foster.cc.crt: OK
Now, because this is a server certificate I intend to use to encrypt IMAP
sessions using SSL, I need to have it in the right place,
in /usr/local/ssl/certs/imapssld.pem
(I am using UW-IMAP on FreeBSD)
cat mail.foster.cc.crt mail.foster.cc.key > /usr/local/ssl/certs/imapssld.pem
mysql> show grants for root@localhost; +---------------------------------------------------------------------+ | grants for root@localhost | +---------------------------------------------------------------------+ | grant all privileges on *.* to 'root'@'localhost' with grant option | +---------------------------------------------------------------------+ 1 row in set (0.00 sec)
rpmdb: Suspiciously high nelem of 4294967294 on page 0 error: db4 error(-30979) from db->verify: DB_VERIFY_BAD: Database verification failedDo this:
rpm --rebuilddb -v
(process:8319): gdk-warning **: locale not supported by c library
(process:8319): gtk-warning **: locale not supported by c library.
using the fallback 'c' locale.
or this
~ mdf@gentoo1>perl -v
perl: warning: setting locale failed.
perl: warning: please check that your locale settings:
language = (unset),
lc_all = (unset),
lang = "en_us.utf-8"
are supported and installed on your system.
perl: warning: falling back to the standard locale ("c").
this is perl, v5.8.0 built for i686-linux
then the solution is to set your lc_all environment variable
~ mdf@gentoo1>setenv LC_ALL C
on a gentoo-1.4rc1 system, add this line into /etc/env.d/00basic for permanency.
LC_ALL="C"
/usr/bin/keychain: line 1: mkdtemp:: command not found
Sooner or later you'll get some program core dumping on you. A common error
message seen in this case is Segmentation fault (core dumped
If you want to get an idea of what happened (YMMV) try some of the following
things. Let's assume the core dump is named core
>file core
core: ELF 32-bit LSB core file of 'mail' (signal 11), Intel 80386, version 1
>file /inetd.core
/inetd.core: ELF 32-bit LSB core file Intel 80386, version 1 (FreeBSD), FreeBSD-style, from 'inetd'
>strings core | less
CORE
mail
wrappe
Cannot give -f and people to send to.
/etc/mail.rc
~/.mailrc
quiet
Mail version %s. Type ? for help.
Interrupt
detract asked to insert commas
From %s %s
SHELL
/bin/csh
Can't reopen image
metoo
Expanding alias to depth larger than %d
No names to unpack
verbose
...
>gdb executable_name core_file
Here's a specific example. It didn't do quite as well as what happened above, but is nonetheless useful...
>gdb /usr/sbin/inetd /inetd.core
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...(no debugging symbols found)...
warning: exec file is newer than core file.
Core was generated by `inetd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libutil.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libwrap.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libipsec.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libc.so.4...(no debugging symbols found)...done.
Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols found)...done.
#0 0x804ad66 in getsockname ()
# wildcard mx etc, add
search .
# to the /etc/resolv.conf file
regexp masks
4th quarter 2001
20001[012]*
3rd quarter 2000 2nd 1st
20000[789]* 20000[456] 20000[123]
Sendmail
sendmail.cw is now called local-host-names
generate rpm from tar
Up to date RPMs for various distributions can be found at helixcode.
Up to date packages can also be generated from the source by running
"rpm -ta dia-*.tar.gz"
# ls listings
ls -hAl # show human readable output size of all files except . and ..
looking for -lz?
~ mdf@smokey>rpm -q --whatprovides /usr/lib/libz.so
zlib-devel-1.1.3-22
# clear mac (ARP) entries on a Cisco Catalyst 2900/3500 switch
clear mac-address-table
#cleanup 0 zero byte files
find . -size 0 -delete
#move file hierarchies using tar
tar -cf - -c srcdir . | tar xpf - -c destdir
# or using cp on freebsd
cp -pvr srcdir destdiro
# or cp on redhat (v is optional verbose)
cp -av srcdir destdir/
# create a tarball from files using find
find . -name 'ccode*' -print | tar --create --verbose --file=/tmp/ccode.tar -t -
# stronghold wouldn't work with a new certificate. then i found this on the web
why do i receive a "no shared cipher" or "no common encryption algorithm" error?
the "no shared cipher" or "no common encryption algorithm" error message occurs when a new certificate has been
installed, but it hasn't been read properly when the server is started. to fix this, please stop the server with the
"stop-server" script, wait a minute for all the stronghold httpd processes to die, then restart it with the "start-server" script.
ref: http://www.redhat.com/support/resources/faqs/stronghold3/error_msgs_faq.html#cipher
if galeon won't start, complaining of gconf problems, try
rm ~/.gconfd/lock/*
screenshot: import -window root -crop 1240x1024+40+0 -quality 90 corner1.png
import -window root -crop 1240x1024+40+0 -colors 256 -quality 75 corner1-75.jpg
this grabs a screenshot of a remote x user's desktop
import -window root -display nomad.lan.enic.cc:0 damondesk1.jpg
insert a revision tag from rcs into a document (checked-into same)
put $id: tips,v 1.9 2003/04/24 14:06:48 mdf exp $ into the document
or here's the perl syntax to extract just the version number (1.20)
my @a = split(/\s/, '$revision: 1.9 $'); #this will change w/ rcs tag
$version = $a[1]; undef(@a);
see the rcsintro page for more info.
transparent gif
use gimp and create a layer that is 'transparent'. on the other layer (where the image is)
select the shape(s) and copy to clipboard. change to transparent layer and paste.
delete the old (other) layer. go to image-flatten image, then immediately save-as gif.
killall not working, try this command
ps axf | grep program | awk '{ print $1 }' | xargs kill -9
if you are a hostmaster (contact) for domain names, use mutt as your mailer
since it allows you to set the from address easily. Evolution will also.
rcs: how can i show the revision number inside the file?
type (dollar-sign)Id:(dollar-sign) somewhere inside a comment in the file, and it will be expanded to show revision information every time the file is checked out.
rsync error:
building file list ... pop_dir /some/file/folder/path : Permission denied
I got this error after NOT using su - rsyncuser, but had done su rsyncuser
instead. Must be something to do with the environment.
Solution: su - rsyncuser
outlook - setting it to mark a message as read, immediately...
Tools...Options...Other...Preview Pane
© 2003-2004 Mark Foster
If I was helpful, please let me know !
$Id: tips.html,v 1.2 2005/11/12 16:35:13 mdf Exp $