compiling xinetd on Solaris 8

You’ll want to download xinetd from here: https://github.com/xinetd-org/xinetd

Just my notes from an old version:

./configure
make
make install perl /usr/local/sbin/xconv.pl < /etc/inetd.conf > /tmp/xinetd.conf then modify your /etc/rc2.d/S72inetsvc
/usr/sbin/inetd -s &
to
/usr/local/sbin/xinetd& mv /tmp/xinetd.conf /etc/xinetd.conf
then make appropriate changes in /etc/xinetd.conf service ftp
{
socket_type = stream
wait = no
protocol = tcp
user = root
server = /usr/local/sbin/in.proftpd
bind = 192.168.0.3
}
service telnet
{
flags = NAMEINARGS
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
server_args = in.telnetd
}

Postfix install notes

make -f Makefile.init makefiles “CCARGS=-DUSE_SASL_AUTH -DHAS_PCRE -DHAS_LDAP -I/usr/include -I/usr/include/pcre -I/usr/include/sasl” “AUXLIBS=-L/usr/lib -lpcre -lldap -L/usr/local/lib -llber -lsasl2” clam install
./configure –enable-milter –prefix=/usr –sysconfdir=/etc –localstatedir=/var –mandir=/usr/share/man/ general install
./configure –bindir=/usr/bin –mandir=/usr/share/man –includedir=/usr/include –sbindir=/usr/sbin –sysconfdir=/etc –localstatedir=/var]]>

DSPAM install notes

with-mysql-includes=/usr/local/include/mysql –with-mysql-libraries=/usr/local/lib/mysql
./configure –bindir=/usr/bin –sbindir=/usr/sbin –enable-whitelist –enable-source-address-tracking\
–with-userdir=/var/dspam –with-logdir=/var –sysconfdir=/etc –prefix=/usr –localstatedir=/var\
–with-userdir-owner=amavisd –mandir=/usr/share/man –libexecdir=/usr/libexec –datadir=/usr/share\
–with-userdir-group=amavisd \
–with-dspam-owner=amavisd \
–with-dspam-group=amavisd \
–with-dspam-mode=4510 \
–with-local-delivery-agent=/usr/sbin/sendmail \
–with-storage-driver=mysql_drv \
–with-mysql-includes=/usr/include/mysql \
–with-mysql-libraries=/usr/lib/mysql \
–enable-alternative-bayesian \
–disable-trusted-user-security \
–enable-opt-in \
–enable-large-scale \
–enable-virtual-users \
–enable-long-usernames \
–enable-debug –enable-robinson –enable-robinson-pvalues –enable-neural-networking
./configure –with-ldap –bindir=/usr/bin –mandir=/usr/share/man –includedir=/usr/include –sbindir=/usr/sbin –sysconfdir=/etc –localstatedir=/var –prefix=/usr –with-group=amavisd –with-user=amavisd –with-dbdir=/var/clamav/
mkdir /var/dspam/opt-in
chown -R amavisd:amavisd /var/dspam/opt-in 1028 mkdir /var/dspam
1029 chown -R amavisd:amavisd /var/dspam/
1030 ls -l /var/dspam/
1031 ls -ld /var/dspam/
1032 service mysqld start
1033 service mysql start
1034 ps -ef
1035 mysql -e “create database dspam”
1036 mysql -e “grant all on dspam.* to dspam@localhost identified by ‘DSPAMPASS'”
1037 ls
1038 cd dspam-3.2.1/tools.mysql_drv/
1039 mysql dspam < mysql_objects-4.1.sql
1040 mysql dspam < mysql dspam < virtual_users.sql
1041 mysql dspam < mysql dspam < virtual_users.sql
1042 mysql dspam < virtual_users.sql
1043 vi /var/dspam/mysql.data
1044 chown amavisd:amavisd /var/dspam/mysql.data
1045 chmod 440 /var/dspam/mysql.data
1046 tail -f /var/log/mail/info
1047 bg
1048 service amavisd restart
1049 service amavisd stop
1050 amavisd debug
1051 service amavisd start
1052 dspam_stats
1053 vi /etc/dspam.conf
1054 dspam_stats
1055 netstat -apn | grep mysql
1056 vi /etc/dspam.conf
1057 dspam_stats]]>

How to share Windows to Linux (mount Windows share)

1) Create the Windows share on the Windows box.
2) Log into linux as root. Then type “smbclient -L
You’ll get some output like this:
# smbclient -L 10.16.8.210
added interface ip=10.16.80.1 bcast=10.16.95.255 nmask=255.255.240.0
Password:
Anonymous login successful
Domain=[OFFICE] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Sharename Type Comment
——— —- ——-
IPC$ IPC Remote IPC
print$ Disk Printer Drivers
shareddocs Disk
tmp Disk Temporary file space 3) With this, you’ll have the share names.
4) To mount, you can run:
mount -t smbfs -o username=nobody,password=”” //10.16.8.210/tmp /mnt
5) ls -l /mnt
You should see the files there.]]>

How to get USB devices to work in Linux or the ESX console

Here is how I’ve gotten a couple of cdroms / usb memory sticks / hard drives to work.

1) modprobe usb-ohci
Or
modprobe usb-uhci
(one of them should work, one may fail)

2) modprobe usb-storage

3) tail /var/log/messages
Or
dmesg
and you should see something like this:
Feb 8 14:50:56 supp15 kernel: Initializing USB Mass Storage driver…
Feb 8 14:50:56 supp15 kernel: usb.c: registered new driver usb-storage
Feb 8 14:50:56 supp15 kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Feb 8 14:50:56 supp15 kernel: Vendor: SanDisk Model: Cruzer Mini Rev: 0.4
Feb 8 14:50:56 supp15 kernel: Type: Direct-Access ANSI SCSI revision: 02
Feb 8 14:50:56 supp15 kernel: VMWARE SCSI Id: Supported VPD pages for sdb : 0x1f 0x0
Feb 8 14:50:56 supp15 kernel: VMWARE SCSI Id: Could not get disk id for sdb
Feb 8 14:50:56 supp15 kernel: :VMWARE: Unique Device attached as scsi disk sdb at scsi1, channel 0, id 0, lun 0
Feb 8 14:50:56 supp15 kernel: Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0
Feb 8 14:50:56 supp15 kernel: scsi_register_host starting finish
Feb 8 14:50:56 supp15 kernel: SCSI device sdb: 2001888 512-byte hdwr sectors (976 MB)
Feb 8 14:50:56 supp15 kernel: sdb: Write Protect is off
Feb 8 14:50:56 supp15 kernel: sdb: sdb1 Feb 8 14:50:56 supp15 kernel: scsi_register_host done with finish
Feb 8 14:50:56 supp15 kernel: USB Mass Storage support registered.

4) Now that we know that it’s sdb1,
Create the mountpoint directory:
mkdir /mnt/usb
Mount the device:
mount /dev/sdb1 /mnt/usb

That’s it. Your files should be in /mnt/usb. To check, just run ls /mnt/usb

In a case that you don’t have /dev/sdb1 there, which is what happened to me once with a Dell CDrom, I had to mknod the device.
After plugging the usb cdrom into the machine, /var/log/messages showed:

date hostname kernel: sr0: scsi3-mmc drive: 10x/10x cd/rw …..

Unfortunately, if you type: “mount /dev/sr0 /mnt/mountpoint”, it will say:
“mount: special device /dev/sr0 does not exist” and that doesn’t do us any good. So what I did after that was:
cd /dev
mknod sr0 b 11 0

With that, /dev/sr0 existed and hence I was able to run:
mount /dev/sr0 /mnt/mountpoint

or, I could run:
ln -s /dev/sr0 /dev/cdrom
and run:
mount /dev/cdrom /mnt/mountpoint

That’s it!

How to remove hidden devices from Windows

Properties > Hardware > Device Manager) Microsoft addresses this issue in their Knowledge Base article 269155, which is available at the time of this writing at: http://support.microsoft.com/kb/269155 To resolve this problem, follow these steps to remove fancy undetected devices in the Device Manager and uninstall them from the registry: 1. Select Start> Run.
2. Enter cmd.exe and press Enter.
3. At the command prompt, run this command: set devmgr_show_nonpresent_devices=1 4. Enter Start DEVMGMT.MSC and press Enter to start Device Manager.
5. Select View > Show Hidden Devices.
6. Expand all trees – you can just press “*” from the keypad on the “My Computer”
7. Right-click the dimmed items, and then select Uninstall.
8. Close Device Manager and reboot.]]>