Solaris 10: managing services with SMF

In Solaris 10, services are managed by SMF. The scripts in /etc/rcX.d are only there for legacy (and so is inetd).
To manage the services, you mainly use 2 commands : svcadm and svcs. Below are the most useful commands.

disable services :
# svcadm disable network/finger

enable services :
# svcadm enable network/finger

list all enabled services :
# svcs

list all services:
#svcs -a

list error conditions for services:
#svcs -x

These are the only options I’ve use so far … for the other ones, check the manual !

Unix : transfering a filesystem or directory

to transfer a filesystem or directory while preserving permissions, special files and such, you can use the following :

# cd sourceDirectory
# tar cpf – . | (cd destinationDirectory && tar xpf – )

The first tar will archive the source directory and pipe it out to the second one which operates the extraction in the destination directory.

Using del.icio.us as a web based inventory

del.icio.us is a website where you can store your bookmarks, tag them to easily find them afterwards, and it is social bookmarking in the sense that your bookmarks can be searched, and so are others’ bookmarks, building a kind of giant directory of humanly maintained links to the world wide web.

But you can go beyond saving your bookmarks and searching others’…

Continue reading Using del.icio.us as a web based inventory

OpenBSD : Creating a transparent bridge

This post will be short, because it is actually easier than I expected … Anyway, considering my memory, better blog out that for later reference 😉

A bridge is a network device used to connect two or more network segments. You can achieve this easily on OpenBSD with the following commands :

# echo 'up' > /etc/hostname.if0
# echo 'up' > /etc/hostname.if1
# echo 'add if0 add if1 up' > /etc/bridgename.bridge0

This will setup the two interfaces if0 and if1 (replace with your own, like rl0, em0, etc etc) and add them into the bridge0.

Then you need to enable ip forwarding so that IP packets will pass from one interface to the others as needed. You do that by editing the file /etc/sysctl.conf and uncommenting the line which reads :

#net.inet.ip.forwarding=1
Once this is all done, reboot to activate.

This bridge is IP-less, which means it is “harder” to attack. You can still filter at MAC level and at IP level through PF (the firewall of OpenBSD).

Tested on OpenBSD 3.9

Man pages :

Estimating network throughput / bandwidth / performance with FTP

On a Unix machine, you can use this little ftp trick to have an idea of your throughput :

ftp somehost
ftp> put “| dd if=/dev/zero bs=100000 count=100” /dev/null
200 PORT command successful.
150 ASCII data connection for /dev/null (192.168.0.1,32953).
100+0 records in
100+0 records out
226 Transfer complete.
local: | dd if=/dev/zero bs=100000 count=100 remote: /dev/null
10000000 bytes sent in 2.9 seconds (3388.52 Kbytes/s)

This will generate a stream of bytes from one host to another and give you the data rate at the end

Software list

Here is the list of the software I use on my personnal computer. All of them are free for personnal use :

Malware Protection

AVG Free Edition – Antivirus
Adaware – Spyware removal tool
Spybot – Spyware removal tool

Web

Firefox – Web browser
GTalk – Instant messaging
MSN Messenger – Instant Messaging
ICQ – Instant Messaging
PuTTY – Multi-protocole remote terminal

Productivity

OpenOffice – Office suite
PDF Creator – Creating PDF
Sunbird – Calendar

System

DIRMS Defrag Tools
PowerToys – Tweak UI
SysInternals – AutoRuns : displays what runs at startup
SysInternals – PageDefrag : defrag your pagefile at boot
SysInternals – ProcessExplorer : Task Manager on steroids

Misc

Java
7-Zip – Good free archiver (many archive types supported)
AutoHotKey – Macros for windows

Media

VLC – Media player
foobar2000 – Music player

DocBook

Bored of fighting with MS-Word to have proper titles numbering ? Tired of messing around styles ? Want a more “meaning oriented formating” and less “aesthetic oriented formating” ? Would like to generate HTML, PDF, WindowsHelp, or anything from the same source file ?

Have a look at DocBook ! DocBook is a document standard which lets you do all of this, and much more …

And XMLMind XML Editor is a nice free (like beer not ideas) editor which lets you edit DocBook Documents in a WYSIWYG fashion.

Links :

DocBook : The Definitive Guide

XMLMind XML Editor

FreeBSD’s handbook (written in DocBook, and rendered as HTML)

Windows XP – Disable administrative shares

Windows has a bad habit of enabling by default some shares on a new installation. These are, for example, C$, D$ (they give access to your partition roots) … ADMIN$, IPC$

Those shares are accessible by the administrators, but they could be a useless security breach.

Even worse, if you delete them, they will come back at the next start of the Server service starts…
If you wish to permanently disable them then create the following key in the registry (if it already exists, set the value to 0) :

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AutoShareWks

REG_DWORD = 0

more good informations here : http://www.petri.co.il/disable_administrative_shares.htm