So let us do some real work now to secure our system:There is this command ( as root )

netstat -tap | grep LISTEN

That will show you the active servers on your system and what port they listen to . . . . but this needs far more information . . . . let us say that in general only the services you allowed running above should be seen in there . . . Example:

tcp 0 0 *:ipp *:* LISTEN 1758/cupsd

( This one is okay, the cups printer deamon, and needs to be running ! )Another command is:

nmap -sS 127.0.0.1

It shows you the same servers, but now with the port numbers they listen to.So, like I said, the cupsserver is okay, but if any of the following servers are active and in LISTEN mode, it would be safer to shut them down: fingerftpd kdesshlockd mountd named or BINDnfsdrpcrloginrsh sendmail ( Only needed if you run a mailserver )snmpsslsshstatd rusertelnetd X ( the part that listens to tcp )And, if you're not running a web server, you should also shut down any running httpd process.You can shut down the processes for the current session with "kill PID" ( where PID is the number you see just before the name of the service . . in our example it would be: 1662 )To prevent those services from starting up at boot permanently ( and they are not in the MCC "services" tool ) you will have to edit the /etc/inetd.conf file.A radical way to do this is back up the old /etc/inetd.conf file:

# mv /etc/inetd.conf /etc/inetd.conf.OLD

and replace it by an empty file:

# touch /etc/inetd.conf

. . This will eliminate most of the ones listed above that can not be found in the MCC. Then to stop X from listening to a certain port:In Mandrake and PCLos: add the bold part to the last line in the "/etc/X11/xdm/Xservers" file:

In Slackware: add the bold part to the last line in the "/etc/X11/xdm/Xservers" file:

Quote

:0 local /usr/X11R6/bin/X -nolisten tcp

After this exercise the two commands I gave you above ( netstat and nmap ) should return no entries then only "cupsd". And maybe the samba, mail or webserver you absolutely want running.Have FUN securing your system . . . next time we look at rootkits ;)A last one for our Slackware users . . to disable sshd:

SECURITY: ROOTKIT CHECKERSA far bigger danger to your Linux system then viruses are rootkits. Most of them will be stopped entering your system by a decent firewall, but still a regular check is strongly recommended. Rootkits are self-hiding toolkits used by blackhats/crackers/scriptkiddies to avoid the eye of the sysadmin.A rootkit scanner is scanning tool to ensure you are about 99.9% clean of nasty tools. This tool scans for rootkits, backdoors and local exploits.There are two tools I recommend:chkrootkit ( http://www.chkrootkit.org ) is an easy to use tool, included in many distro's either installed by default or on the install CDs.Simply, as root, running

# chkrootkit

will do the job.rkhunter ( http://www.rootkit.nl ) is a tool that just does a bit more than only looking for rootkits, it performs a system-wide check for vunerable files and dependencies on your system:- MD5 hash compare- Look for default files used by rootkits- Wrong file permissions for binaries- Look for suspected strings in LKM and KLD modules- Look for hidden files- Optional scan within plaintext and binary filesThe install file is available as tarball and rpm and will be installed in /usr/local/bin . . . . on some distro's you additionally need "Perl-Digest-SHA1" for a succesful install.Running the program:

# rkhunter -c --createlogfile

Making rkhunter a cron job to run daily and report by mail to root is ultra simple, all you have to do is:

ATTENTION !!! DO NOT install chkrootkit on your system and simply run it periodically.An attacker may simply find the installation and change it so that it doesn't detect his presence.Compile it and put it on removable or read-only media.

SECURITY: AV SOFTWARE ( And why we don't need it )Because on several occasions Nathan ( nlinecomputers ) has written some very good and clear posts about viruses in Linux on the forum, I have asked him to make a compilation out of several threads he contributed.Well, he did not let us down ! . . . . . Here it is:

nlinecomputers, on Forum, said:

Users who are new to Linux and have a background battling viruses in Windows are often shocked when long time Linux users advise them not to worry about viruses in Linux. "Linux has no viruses" is often said and many new Linux users have a difficult time believing it."Why does Linux have no viruses?"The nature of the setup of a Linux, UNIX, BSD, or even a Mac makes having and running viruses on your system difficult to impossible. *nix operating systems are much more securely designed then Windows. Many functions in Windows can be accessed by services very easily and without a password prompt. Most Linux users can't even change the time of day on the computer without a password prompt. While at times annoying, this level of security is what keeps what few viruses that do exist in Linux under control.There are some Linux viruses, but not many. Last time I checked there are only about 20 viruses that can infect a Linux box versus the several hundred thousand viruses that can infect a Windows box. All of the Linux viruses exploit various known holes in Linux. All the holes I know of have been patched. So if you run a recent version of Linux, and you keep it patched, you can't be infected by any of them. The structure of Linux makes writing a virus very difficult as it requires root access to do anything of significance. For a virus to run it would have to be granted root access with a password request. If you fail to give it root access then the most a virus could do, if anything, is damage your home directory. It is unlikely it could even run again so it would die there in your home directory. Most smart Linux users grasp the power of root access and would question why an unknown program is suddenly requesting root access. (You don't enter your password for just ANY prompt do you? Only for programs YOU have called up, right?)Plus each Linux distro is different, so it is difficult to write a virus that would run on say Red Hat and also be able to run on a Debian platform (or SuSE, or Slackware, or Mandrake?...). This further limits the chances of an outbreak. This variety is one of levels of protection that Linux users have that Windows does not. All Windows boxes are very much alike and that common ground makes for a very ripe breeding ground for viruses."Ok so I'm safe from any so called Linux virus, but all those Windows viruses can hurt me because I can read my FAT32 partition, right?"Not really. A virus isn't magic. It's just a computer program. It is an evil program, but still just a program. Programs can't run on systems they aren't designed for. You can't run a Windows program on a Mac or in Linux or on an IBM Mainframe. If the virus is a Windows virus then in can only infect a Windows system and only when Windows is booted up and running. Why, because Windows is the only thing that can run the code. Can you put an infected file on a Linux system? Sure, but it can't do anything. To Linux it is gibberish. Just like you can't run KDE on Windows or run Microsoft Word on a Linux box. Linux can't be hurt by Windows viruses however it can host them. For example if you use Linux as a mail server then it can pass the virus around just like any other mail server. Note that passing a virus in an email is not the same as infecting the server. A virus is just a program and it can not infect a system unless it is run on it. But if you have an office full of Windows clients and you use your Linux box as an in house mail server or as a file server and one of the Windows clients gets infected then all the other Windows computers are at risk of infection via the Linux box and the email. So if you're running a mail server you might need to consider AV for the server. Otherwise it really isn't an issue. Even with a mail server the Linux server ITSELF can't be infected just all the Windows boxes that connect to it. (Which is bad enough?)"So what do I need to do? I need to do something, just in case. Don't I?"The best way to keep your system secure against viruses is by keeping your software updated and patched, by making sure that your system doesn't run unneeded services and a by running a firewall.--------------------Nathan Williams, N-Line Computers

USER RELATED CRON JOBS If you want to set up some tasks yourself ( as user ) to run every so many hours/days, here is how to do that: Make a text file and let's say we call it "test-cron". In the file we will put the following lines:

( Sure you need those sound files in the places indicated above ) See this link for the time settings: Cron Jobs Then give the command:

$ crontab test-cron

And from then on, every hour the "Hour.wav" will play and every half hour the "HalfHour.wav" will . . just like grandma's clock ( Your personal cron-settings are then saved in /var/spool/cron/bruno ) Sure you can do this as root as well so it will run independently from whichever user is logged in at that moment Bruno

BACKING UP THE MBRHere is a clever trick that John Locke sent us for backing up and restoring the MBR . . . :

Quote

Just another note about restoring the boot loader for dual boot systems,after Windows messes it up. In Linux, the "dd" command can read andwrite to/from raw disks and files. If you have a floppy drive, creatinga boot disk is as simple as putting a floppy in the drive and typingthis:$ su<type password># dd if=/dev/hda of=/dev/fd0 bs=512 count=1This makes an exact copy of the MBR of the first hard drive, copying itto a floppy disk. You can boot directly from this floppy, and see yourold boot menu. You can restore it by switching the "if=" and "of="(input file, output file) parameters.If you don't have a floppy drive, you can back it up to a file withthis:# dd if=/dev/hda of=/home/john/boot.mbr bs=512 count=1Then you can boot into a CD-ROM distribution such as Knoppix, or oftenuse your Linux distribution's installation CD to boot into rescue mode,and restore it with:$ su# dd if=/mnt/hda5/john/boot.mbr of=/dev/hda bs=512 count=1(you'll need to find and mount the partition containing the directorywhere you backed up the MBR for the "if" parameter--this is an example).Cheers,-- John Locke

Thanks John, nice one ! BrunoPS: Also, Striker shows us a way to write lilo to floppy:

CDRECORD and KERNEL 2.6( If you want you can skip the intro and go to the "nutshell" at the bottom )

Warly, on Mandrakesoft, said:

Mandrakelinux 10.0: to Burn or not to BurnThe linux kernel 2.6, the default one in Mandrakelinux 10.0, has introduced some changes in the way burning is done. A release note was published to explain the new behavior, but it seems not explicit enough to explain what changed and what is now the best way to burn under Mandrakelinux 10.0.First, let have some technical facts. Basically all the burners have the same interface, which is a SCSI one, because the IDE commands are just too basic to do anything with a burner. However SCSI interface is not as widely available as IDE one, and is more expensive because you need an extra adapter ; so nowadays most of the burner sold have an IDE interface. To be able to send complex SCSI command over the IDE bus, the ATAPI standard has been developed. This ATAPI standard just described how to send SCSI commands via an IDE bus, however under the linux kernel 2.4 the ATAPI support was not present into the default IDE driver, but into the ide-scsi one, specifically developed for that matter. As far as burning programs are concerned, under Mandrakelinux the burning tools are either cdrecord or dvd+rw-tools. All the graphical burning interfaces, k3b, xcdroast, or others are using either cdrecord or dvd+rw-tools in background. Until recently, the more versatile and used has been cdrecord, but the free version only allow to burn CD-R and CD-RW, however I have been able to maintain an extra patch to be able to burn any kind of DVD media, DVD-R, DVD-RW, DVD+R and DVD+RW. To burn with cdrecord you need to specify the interface and the device you want to use on the command line, for example dev=sg:1,0,1 (or just dev=1,0,1) to burn on the SCSI bus 1, target 0, lun 1 (each SCSI device is defined with these 3 numbers). This SCSI emulation under linux 2.4 was the reason of this 'hdc=ide-scsi' thing you must have met into your bootloader command line if you once wanted to burn under a GNU/Linux system with an ATAPI burner. cdrecord also supported to burn without this SCSI emulation with the 'dev=ATAPI:1,0,0', but unfortunately this method does not allow to use Direct Memory Access (DMA), which impacts the performances and basically does not allow to burn at anything faster than 16x speed. So we were stuck and had to use this ide-scsi emulation to be able to correctly burn under GNU/Linux. This is now past! With the linux kernel 2.6 a new ATAPI interface has been developed and directly available with the IDE driver. This interface is shortly known as the ATA interface, which is also supported by cdrecord. So forget about this SCSI emulation, ATAPI interface or whatever, just now use the more logical way you would have first imagine, which is to just specify the device name of your burner, for example dev=/dev/hdc, if your burner is the first device on the second IDE bus of your computer. You can scan your buses with "cdrecord -scanbus" to know which devices are detected, note that the Mandrakelinux cdrecord automatically default to the new ATA interface if the SCSI interface does not find anything, you can check that with the "scsidev: 'ATA'" line in the scanbus command output. If you want to be sure to scan only the ATA bus, just use "cdrecord dev=ATA -scanbus". To specify the device, you can use 'dev=/dev/hdc' or something like 'dev=ATA:1,0,0' from the scanbus output. These both syntax are internally the same thing, and the new ATA interface will be used (and allow DMA burning and the maximum speed of your burner). To conclude, with the new Mandrakelinux 10.0, just forget about anything you know about burning with this SCSI emulation, and just remember that you only need to know one thing, the name of the device representing your burner (you can easily find this out with a "cat /proc/sys/dev/cdrom/info" or "dmesg | grep CD" commands). So be careful not to use this ATAPI interface under your favorite burning tool, and do not take care about their messages regarding SCSI emulation, they are outdated (xcdroast has been patched to be able to use the ATA interface, I am not sure about k3b).

So in a nutshell:In Mandrake 10, and probably soon in other distro's with the 2.6 kernel, first do

# dmesg | grep CD

to see what /dev/hd?? your burner is located . . and then:

# cdrecord dev=/dev/hdc filename.iso

That is all . . . . ( So no more "--scanbus" !! )K3b and other GUI burning tools will already be adapted to the new kernel and cdrecord software. Bruno

ALTERNATIVE MANDRIVA 2006 INSTALL( NOTE: For Mandriva 2005 there are instructions Here )There are two alternative ways to download and install Mandrake 2006 ( As long as there are no ISOs available yet )First get this file and burn it to CD: boot.iso( For other versions: you need the "boot.iso" located in the "images" directory )FTP installBurn the boot.iso to CD and boot from it . . then:- Press Enter- At the screen: "Please choose your install method" choose FTP server- DHCP- "Please fill entries" I filled in: "uranus" on first line ( name of my system ) and "lan" on second line.- Wait until the connection is made and dialog shows up ( takes a while !!! )- Question about proxy: leave blank- When choosing the sources, tell it that you will select the source yourself "Specify the mirror manually"- On the first line: "ftp.nluug.nl" and on the second line: "/pub/os/Linux/distr/Mandrakelinux/official/2006.0/i586" and press OKThen the program will load into memory and proceed to go on as a normal install.HD install- Copy all the files from

to a directory ( /home/bruno/i586 ) on a partition on your HD Use Kget's integration in Konqueror and use the filemanager, ORThe next command

rsync -P -v -r ftp.nluug.nl::Mandrakelinux/official/2006.0/i586 .

You DO need the dot at the end of that command !!! - Boot from the boot-CD we made above- It will give you a dialog where you want to install from: choose "hard disk"- The next dialog will ask you from which HD ( if you have 2 )- After that a dialog will ask you on what partition the files are located- And the next dialog asks "Directory or ISO image _________" type "/home/bruno/i586" and press OKThen the program will load into memory and proceed to go on as a normal install. :DB) Bruno

URPMI SOURCES MANDRAKE 10.0 OfficialThere are a few sources you can add to the package manager of Mandrake to get extra software. Some of them everybody can add, but a few ( the last two ) are only for Club Members. See, here how it's done:

Bruno, on Tips, said:

Go to a console, log in as 'su' and paste the line after the prompt and hit enter. Now it should work and get the list . . . be patient, it takes a while. Then as you get the prompt back, close the console ( Ctrl+d , 2x ). Now that we have added the source to your software manager, we can have a look at all the packages: Go to the MCC --> Software Management --> 'RpmDrake helps you install software packages' ( the icon with the + ). Now you will see the text : 'All packages' under the search-box., 'All packages' 'by group' change the by group in: 'by medium repository' and you will get a list with the sources you can choose from: CD1, CD2, CD3 and also the Update source and the just added source. Click in the little triangle in front of the new source, and a list will fold out with all the packages you can choose from . . . . FUN, MAGIC, BLISS !

Here they are: ( Don't click on the links but paste them in a root-console ) YOU HAVE TO BE ON LINE ! Source PLF

( replace "NICKNAME" and "PASSWORD" ) BrunoNOTE 1: If you add the sources today . . and you want to use them, let us say next week, you first have to update them because new packages might have been added, and old packages might have been removed . . . so each time before using them do "urpmi.update -a" as root in a console !!NOTE 2: So again the warning: Mainly I only have the CD and Contrib source active all the time . . and only make all others active if I can not find the package I look for in those two ( CD and Contrib ) . . . . also you will get just too many different versions of the same package if you use all the sources at the same time, and sticking to the native Mandrake ones is recommended !

RESTORING THE XP MBRHere is a Tip that I hope you will never use . . but still it has to be posted in this thread . . how do you restore the MBR to the state it was with only Windows XP.The info comes from Jodef ( Johann )

Johann, on Forum, said:

Boot from Win XP Cd ( you will get setup inspecting hardware configuration)Will come to screen to setup or repair existing install press R to enter recovery console You will be asked to choose install to repair enter number and you will get prompt for admin password followed by C:WINDOWS> at this point type FIXMBR or HELP will give you list of options.

As a result, you will find the mount.txt file in home. Open it and send the text file to your printer.OR: ( also for easy reading )3).In Konqueror: type "#mount" in the address bar and press the "print" button from the menu bar.AND: 4). The super man pages: ( for the ones you can not find on your system ) http://gd.tuwien.ac....erman_pages.phpSearch for "mount" and print it from your browser.Sure, you do know that there is a man page for every command . . . reading about them can sometimes show you surprising extra options for each command. :DB) Bruno

RSYNCWe all know how to download from FTP, but there is an other way: rsync ! When ftp servers are really busy you might have a better/faster download with rsync.To use rsync you need to know a few tricks:To get a full list of what is available with rsync on nluug:

!! Do not forget the dot at the end !!! ( It puts the file in your /home or replace the dot with the path to the directory you use to save the download. The file will be a hidden till the download is 100% )The -P argument is to resume a download of a partially downloaded file.Only the boot.iso:

TRANSPARENT CONSOLEHere is a nice tweak to suit any desktop theme you have: a fully transparent, borderless, scrollbarless terminal/console !! :DOkay this is what you need: "Eterm" . . . for you Mandrakers install it with:

# urpmi Eterm

( other distros use your software installer )After the install press Alt+F2 . . . . . you will get the "run-command" dialog . . paste the following command in the box:

You can tweak the size with the --geometry= numbers . . or add more shade by making shade=30 . . . ( the -x is for borderless, the foreground-color is the color of the text )To close the console press Alt+F4 or Ctrl+D or just type "exit" ;)The second part of the tweak: Here is how to incorporate the new command into your menu:Make a script:

If it all works like you expected: change the command for eterm in your menu-editor to "eterm-tweak" BrunoPS: For Slackware ( 10/Current ) you need these packages:eterm-0.9.2-i486-1jim.tgzlibast-0.5-i486-1jim.tgzimlib2-1.1.0-i486-1jim.tgz You can get them at: http://www.linuxpackages.net/ . . and install them with installpkg . . after that it works like a dream !

The latest addition to D*** Small Linux is the so called "DSL extensions". These are extra applications not present on the 50MB CD, but available for installation with a simple command that fetches and installs the desired application from a central repository:"During our last release we incorporated a system which makes it easy to add extensions to DSL. Over the last couple of weeks our user base has made several interesting live CD packages which can be boot from the CD, or any other place which the distro is able to read (hard drive, pen drive, etc). The users have done some good work getting these applications packaged so that they are a drop-in and there are some nice files already available."Some of the "nice files" include Quake 2, GIMP, MPlayer, OpenOffice.org, Ruby, Samba and many others.

Now, how to do this . . and what are the extensions available . . Here are the extensions: http://www.ibiblio.o...amnsmall/mydsl/What you do is make a directory in your /home and call it "optional" :

$ mkdir /home/dsl/optional

Then you download the extensions to that directory. ( let us say for the example we take Gimp )After that you start emelfm:

$ emelfm

And navigate to /home/dsl/optional . . . . you select the package ( Gimp ) you just downloaded and then: in the middle of emelfm there are buttons, the top botton is called "myDSL" . . press that button ! . . . . . Now close emelfm and you will see that at the top of your fluxbox-desktop-menu an item is added: "myDSL" and it unfolds to see "Gimp" !!You can add as many items as you want the same way to that myDSL sub-menu !!!Have FUN !!! BrunoNOTE: Recent versions of D*** Small Linux ( 2.0 ) have a GUI frontend for MyDSL downloads. You still need Emelfm to install the extentions, but it then even creates a desktop icon for the installed applications

INSTALLING MANDRAKE 10.0 OFFICIAL( General instructions ) - Preparation: If this is your first Linux install, check out Basic Rules for Install If you are replacing a previous Mandrake Install back up: - Your browser plugins located in /usr/lib/mozilla/plugins and /usr/lib/mozilla-1.4/plugins ( or 1.6 ) - The ~/evolution directory ( When I restore it, I chown it back to "chown -R bruno:bruno evolution" )- The ~/.galeon/bookmarks.xbel ( or other bookmarks ) - Personal things in your /home directory - Your /etc/lilo.conf ( if you are booting mutiple distro's ) - Your /etc/hosts, /etc/modules.conf, /etc/aliases, /etc/rc.d/rc.local, ~/.bashrc, ~/.exrc if you made any modification to these files. - Set your BIOS to boot from CD and disable PNP aware OS. - There are no errata available yet. - - Put the first CD in the CD-ROM drive and boot your computer. 1st screen:The welcome screen. Press Enter Before the GUI comes back the installer is loading into memory and devices are configured 2nd screen:Language selection, default is US English, Press Next3rd screen:License agreement, select "yes" and Press Next4th screen:Is this an install or an upgrade ? ( Click to enlarge )Tick the box of "install" and Press Next ( Advice: NEVER use Upgrade !!! ) 5th screen:Security level, fill in "root" or your email address and Press Next6th screen:The DrakX Partitioning wizard found etc. etc. - If you have your partitions already made: tick the box "use existing partitions" and Press Next - If you still have to make partitions, or want to change the size of the existing ones: tick te box "Custom Disk Partitioning" and Press Next You will be taken to the very intuitive and easy partitioning tool.Make a 4G partition for / and a 2G for /home. 7th screen:Choose file Mount points Chose the partitons where you want / and /home and Press Next ( Everybody using partitions for /tmp and /usr too . . you know what to do ) 8th screen:Choose the partitions you want to format . . .all boxes have to be ticked and Press Next9th screen:PackagesDo like in screenshot, tick all the boxes on the left, and only the last 3 on the right and Press NextNOTE: Including Gnome will also give you all the gnome programs you can also use in KDE . . so even if you intent to never use Gnome it is better to install it anyway.NOTE: in some cases, additionally checking the box "individual packages" and adding: kdegraphics-kdvi, koffice, xpdf, gimp data-extras, mplayer-ui, xine-ui, xmms, xmms-alsa, kdeadons, kget, xterm, bash-completion, kedit, usbview, kdeedu and nmap-frontend somehow corrects some little bug in the installerNow the install really starts it takes about 16 minutes and you have to change CDs twice10th screen:Root password, Fill in your rootpassword twice and Press Next11th screen:Adding User, fill in name twice and password twice and Press Accept12th screen:Adding another user, Press Next13th screen:Auto login, . . de-select the box, you do not want this, and Press NextNOTE: It is safer to not use this feature, and it makes that you can choose at boot what windowmanager to start. Also if you ever get a corrupted /home directory the non-autologin makes fixing a lot easier. 14th screen:Boot loader, Select "First sector of drive ( MBR )" and Press NextNOTE: It will automatically include your Windows partition for dual boot 15th screen:Summary, . . . . This is very important . . check all the settings, look at the difference I have in the two screenshots: Before configuring After configuring 16th screen:Updates . . . say yes and Press NextNOTE: This feature rarely works, but still it is worth trying . . you will still have to do the updates in the MCC after the first reboot 18th screen:Complete . . remove your CD and Press RebootAfter reboot install Anacron and get the updates see this thread and subscribe to it and get notified as there are new updates posted. BrunoPS: There are more Tips for after the install in This Thread

LM-SENSORSThis is one of the more difficult/critical tweaks: LM-Sensors are for monitoring the temperatures, voltages, and fans of Linux systems with hardware monitoring devices. Now, before we start you have to know that on some systems it is a piece of cake . . . and on other systems with badly supported motherboards, it is a real pain.In most distros you can install LM-Sensors with the package management and they will be on the install CDs . . . if not get them here: http://www2.lm-sensors.nu/~lm78/ ( Do read there if your sensor chips and I2C are supported )After installing the package, first do

# modprobe i2c-dev

Then you have to configure it by running "sensors-detect" as root . . . here is an example, with additional notes of how "sensors-detect" ran on my system:

Quote

$ suPassword:[root@jupiter bruno]# sensors-detectThis program will help you determine which I2C/SMBus modules you need toload to use lm_sensors most effectively. You need to have i2c andlm_sensors installed before running this program.Also, you need to be `root', or at least have access to the /dev/i2c/*files, for most things.If you have patched your kernel and have some drivers built in, you cansafely answer NO if asked to load some modules. In this case, things mayseem a bit confusing, but they will still work. We can start with probing for (PCI) I2C or SMBus adapters. You do not need any special privileges for this. Do you want to probe now? (YES/no): YES <---------------------------------------- !! Probing for PCI bus adapters...Use driver `i2c-viapro' for device 00:11.0: VIA Technologies VT8233A/8235 South BridgeProbe succesfully concluded. We will now try to load each adapter module in turn.Load `i2c-viapro' (say NO if built into your kernel)? (YES/no): NO <---------------------------------------- !! Do you now want to be prompted for non-detectable adapters? (yes/NO): NO <---------------------------------------- !! To continue, we need module `i2c-dev' to be loaded. If it is built-in into your kernel, you can safely skip this.i2c-dev is already loaded. We are now going to do the adapter probings. Some adapters may hang halfway through; we can't really help that. Also, some chips will be double detected; we choose the one with the highest confidence value in that case. If you found that the adapter hung after probing a certain address, you can specify that address to remain unprobed. That often includes address 0x69 (clock chip). Some chips are also accessible through the ISA bus. ISA probes are typically a bit more dangerous, as we have to write to I/O ports to do this. Do you want to scan the ISA bus? (YES/no): YES <---------------------------------------- !! Probing for `National Semiconductor LM78' Trying address 0x0290... Failed!Probing for `National Semiconductor LM78-J' Trying address 0x0290... Failed!Probing for `National Semiconductor LM79' Trying address 0x0290... Failed!Probing for `Winbond W83781D' Trying address 0x0290... Failed!Probing for `Winbond W83782D' Trying address 0x0290... Failed!Probing for `Winbond W83627HF' Trying address 0x0290... Failed!Probing for `Winbond W83697HF' Trying address 0x0290... Failed!Probing for `Silicon Integrated Systems SIS5595' Trying general detect... Failed!Probing for `VIA Technologies VT82C686 Integrated Sensors' Trying general detect... Failed!Probing for `VIA Technologies VT8231 Integrated Sensors' Trying general detect... Failed!Probing for `ITE IT8705F / IT8712F / SiS 950' Trying address 0x0290... Success! (confidence 8, driver `it87')Probing for `IPMI BMC KCS' Trying address 0x0ca0... Failed!Probing for `IPMI BMC SMIC' Trying address 0x0ca8... Failed! Some Super I/O chips may also contain sensors. Super I/O probes are typically a bit more dangerous, as we have to write to I/O ports to do this. Do you want to scan for Super I/O sensors? (YES/no): YES <---------------------------------------- !! Probing for `ITE 8712F Super IO Sensors' Failed! (0x8705)Probing for `SMSC 47M10x Super IO Fan Sensors' Failed!Probing for `SMSC 47M14x Super IO Fan Sensors' Failed!Probing for `VT1211 Super IO Sensors' Failed!Probing for `Winbond W83627HF Super IO Sensors' Failed!Probing for `Winbond W83627THF Super IO Sensors' Failed!Probing for `Winbond W83637HF Super IO Sensors' Failed!Probing for `Winbond W83697HF Super IO Sensors' Failed!Probing for `Winbond W83697UF Super IO PWM' Failed! Now follows a summary of the probes I have just done. Just press ENTER to continue:Driver `it87' (should be inserted): <-------------Important info !! Detects correctly: <-------------Important info !! * ISA bus address 0x0290 (Busdriver `i2c-isa') <-------------Important info !! Chip `ITE IT8705F / IT8712F / SiS 950' (confidence: 8) <-------------Important info !! I will now generate the commands needed to load the I2C modules. Sometimes, a chip is available both through the ISA bus and an I2C bus. ISA bus access is faster, but you need to load an additional driver module for it. If you have the choice, do you want to use the ISA bus or the I2C/SMBus (ISA/smbus)? ISA <---------------------------------------- !! To make the sensors modules behave correctly, add these lines to/etc/modules.conf: <----------------------------------------See below !! NOTE: I made the important sections we need later BLUE#----cut here----# I2C module options alias char-major-89 i2c-dev#----cut here----To load everything that is needed, add this to some /etc/rc* file: <-----------------------------------See below, in /etc/rc.d/rc.local !! #----cut here----# I2C adapter driversmodprobe i2c-isa# I2C chip driversmodprobe it87# sleep 2 # optional/usr/local/bin/sensors -s # recommended#----cut here----WARNING! If you have some things built into your kernel, the list abovewill contain too many modules. Skip the appropriate ones! You really shouldtry these commands right now to make sure everything is working properly.Monitoring programs won't work until it's done.Do you want to generate /etc/sysconfig/lm_sensors? (YES/no): YES <---------------------------------------- !! Copy prog/init/lm_sensors.init to /etc/rc.d/init.d/lm_sensorsfor initialization at boot time.[root@jupiter bruno]#

Next step is running the test of the modules ( see warning above in RED. . we take info from the BLUE section above:

After this you will have to reboot your system to see if the sensors load okay . . and then you can tweak Gkrellm to show the temperatures in the system-monitors on your desktop.( Have a look here: http://web.wt.net/~b...llm/gkrellm.png ) BrunoPS: Next time we will show you how to set up the temps in Gkrellm

SENSORS in GKRELLMIn the previous issue we told you how to set up LM-Sensors, this time we will show you how to let them show in Gkrellm ( our favorite system monitor http://www.gkrellm.net )Right click the top of the Gkrellm GUI and you will get the Configuration GUI. Under the heading "Builtins" you will see the "Sensors" . . . before you configured LM-Sensors the little triangles in front of "Temperatures", "Fans" and "Voltages" were not there . . . but now they are, and unfolding them shows you the sensor-chip that was loaded at boot. Ticking the boxes of the ones you want to show in Gkrellm is the first step.Then click on the "label" . . that makes it possible to change the text of the label shown in the Gkrellm GUI.You can change the order of appearance by dragging the lines up or down. Also you can fine tune the temperature ( if the chip is slightly off ) with the "factor" and "Offset" ( The mobo of my test system needs this badly because it is really wacky )Then there is the option to choose the location, if you want the CPU temps directly under the CPU usage monitor.After that, press the "Alert" button and set at which max temperatures you desire warnings. ( or minimum Fan speed, voltage etc. )Now press "OK" and the job is done ! Congrats !! :w00t: Bruno

PRIMARY, EXTENDED and LOGICAL PARTITIONSThere is always a lot of confusion about partitions and partition numbers. So let us try to shed some light:On an IDE drive, the first drive is called hda, and the partitions are shown as hda1, hda2 . . . . etc. etc. Your second drive is called hdb.On a SCSI drive, the first drive is called sda, the partitions are sda1, sda2 . . The second drive is called sdb. ;)Now that was relatively simple, but now comes the more complicated part, I took parts of this from a post of Jason Wallwork ( Linuxdude32 ) because he was able to explain it better then I can:

Jason, on Forum, said:

An extended partition is the only kind of partition that can have multiple partitions inside. Think of it like a box that contains other boxes, the logical partitions. The extended partition can't store anything, it's just a holder for logical partitions. The extended partitions is a way to get around the fact you can only have four primary partitions on a drive. You can put lots of logical partitions inside it. hda is the whole drivehda1 is a primary partitionhda2 is a primary partitionhda4 is an extended partitionhda5 is an logical partitionhda6 is an logical partitionYou will never see hda4 mounted, just hda5 and hda6, in this case. Note that Linux numbers primary partitions 1-4, logical partitions start at 5 and up, even if there are less than 4 primary partitions.

NOTE: On an IDE drive you can have up to 63 partitions, 3 primary and 60 logical ( contained in one extended partition ) :DOn a SCSI drive the maximum number of partitions is 15 :(So, in a nutshell: if you start out with one HD that has windows C: and D: You will see them in Linux as hda1 and hda2 . . . then as you add a distro and let it automatically use the free space on that drive ( if that distro has that option like Mandrake ) it will make an extended partition and set up a partition for / and a partition for /swap plus a /home partition and call them hda5, hda6 and hda7 ( in that order ). You will see that if you make the partitions yourself, using preferably a Linux tool to make the partitions, the result will be more or less the same, only in that case you will be able to make even more partitions . . . for extra storage, backups, or additional distros. You will only need one swap partition as that can be shared by the various distros. ;) Bruno

TWEAKING the BOOTSPLASHYou will have noticed that modern distros use a bootsplash with a progress bar when you go past Lilo or Grub . . . . Then you can press F2 or Esc to switch to "verbose" mode and see the messages.Now there are a few settings you can change to influence the bootsplash. If you have one with a progress bar ( SUSE, Mandrake, PCLos ) you will see in the /etc/lilo.conf in the append-line there is "splash=silent" . . . I do not like the progress bar and want to see the boot messages all the time, but still have the fancy background: "splash=verbose" is the setting I did put in there. ;)If you want the old-fashion boot screen, black with text, "splash=0" or "splash=native" or just "splash= " will work . . . So:splash=silent ( for the progress bar )splash=verbose ( for the boot messages on colored background )splash=0 ( for the boot messages on a black background like the old days )splash=native ( the same )splash= ( also the same )Have fun ! :DB) Bruno

F-PROT VIRUS SCANNER for LINUXAs an intro I would like to quote a post from a few weeks ago:

Quote

LINUX VIRUS and CHEESEBecause there are a lot of posts lately about Anti Virus Software for Linux . . . I would like to make a few points before I describe how to use the F-Prot Virus scanner in the second post in this thread.1). If you only run Linux you do NOT need AV software2). If you dual boot Linux / Windows and get a virus infected mail in Linux it can NOT jump to your Windows partition ( nor can it spread over the local network to other systems ) . You can even store the attachment in your /home and open the zip ( or whatever the file is ) and it will be dead in the water, it gets no oxygen ( This is also why Linux AV progs do not have a "live guard" module in them: the virus does not execute or move ) . . you can leave it there as long as you want, nothing will happen, your Windows will not get infected as long as you do not deliberately copy it over there of course. 3). If you dual boot you better get a good AV program for Windows4). Only if you are running a mail server you can use a Linux AV program, not because the server will be infected but only because you do not want to pass on a virus to Windows systems. ( good social behavior ) I mean: be reasonable: If you have 2 warehouses, and you use the first one to store cheese . . . are you going to place mouse-traps in the second one where you only store stainless steel ??Don't let the mouse-trap vendors drive you crazy: Mice do not eat stainless steel !!!So I hope I was clear . . . Slow down, Keep Cool, Relax, Life is too short: don't let unfounded fear spoil your FUN in Linux . . ;)See also This real good article by Nathan ! Bruno

If after reading the above you still think you need AV software I recommend F-Prot.I prefer F-Prot because of the ones I tested, it has the fastest scan engine and it has proven its reliabillity since the DOS days.You can download it free from:http://www.f-prot.co...ad_fplinux.htmlNOTE: When writing this, the latest version is 6.0.2, if you are upgrading from a 4.6.* version please make sure you completely remove the old version before installing the new one ! I will give removal instructions for the 4.6.* version at the bottom of this page.Once you downloaded the fp-Linux-i686-ws.tar.gz to your /home directory you do ( as root ):

After the last command the installer will start running. Accept the defaults . . . myself I did not do the last one that adds the cronjob because I want to add that later manually.( It will automatically get the latest updated virus definitions as part of the install process )To get the new virus definitions, next time all you have to do is:

As you can see the command does not need an extra agrument, the default is "fpscan <directory_to_scan>"A quick way to get the updates and do the scan on the evolution directory in one go is:

# /usr/local/bin/f-prot/fpupdate && fpscan /home/bruno/.evolution/

BrunoIMPORTANT:In case you are upgrading from a 4.6.* version please make sure you remove the old version before installing the new one. Here is how to remove the files:( These commands assume you followed the instructions that used to be on this page before Jan 25 2009 )

HIDDEN MESSAGESHere is a nice one for the secretive ones amongst you: How to hide a text file in a .jpeg picture. The result is you see a picture and nothing tells you there is a message hidden inside of it. The technique is called "Steganography", there are a few programs you can use but we will only show the most simple one here. First you need to download "outguess-0.2.tar.gz". Get it at http://www.outguess.org/ After you cd to the directory you downloaded it to, you do:

Then to have a link to the executable in your path: ( adapt the first part of the command to your situation )

# ln -s /home/bruno/Downloads/outguess/outguess /usr/bin/outguess

Now here is how you do it: you need a text file ( in this example we call it "file.txt" ) and a picture ( we call it "file.jpg" ) after that you issue the command:

$ outguess -d file.txt file.jpg output.jpg

This will make the file "output.jpg" Unpacking is just as simple as wrapping:

$ outguess -r output.jpg file.txt

Now, if you really want to be sure your data is safe you can password-protect the "output.jpg" too:

$ outguess -k "password" -d file.txt file.jpg output.jpg

and unwrap:

$ outguess -k "password" -r output.jpg file.txt

( Note: extracing works without the password too, but you get an empty text file :0 ) That is all there is to it More options are in the man-page: Here So, I told you there are other programs too: "Steghide" is such a one and available in the Mandrake contrib sources. You can read more about it ( and Outguess too ) here: http://distrowatch.c...040809#feedback But beware, there is a typo in the command they give to wrap the steghide file. This is the correct one: # steghide embed -ef file.txt -cf file.jpg -sf output.jpg NOTE: ( -ef . . not -pf like they say in the Distrowatch article ) Have FUN Bruno

WIN-DRIVERS for WLAN-CARDSSome vendors refuses to release specs or even a binary Linux driver for their WLAN cards. But there is hope: Ndiswrapper:

Quote

ndiswrapper tries to solve this by making a kernel module that can load Ndis (Windows network driver API) drivers. The goal is not to implement all of the Ndis API, but to implement the functions needed to get cards without Linux drivers to work.

Basic StepsMake sure you have kernel 2.4.20 or higher (2.6 recommended), with all sources !!!Also, make sure you have a PCI or PCMCIA (PC-Card) wireless adapter. USB doesn't really work too well at the moment. I have a NETGEAR WG311v2 and it works perfectly.Download the latest version of NdisWrapper from its SF.net Project Page.Save it to your home directory.Extract it using gunzip ndiswrapper-0.1.0.tar.gz && tar -xvf ndiswrapper-0.1.0.tar (substitute 0.1.0 for whatever version you have).su root so that you can be administator.Move NdisWrapper to (root's) home folder: mv ndiswrapper-0.1.0 ~cd ~/ndiswrapper-0.1.0To compile it, run: make && make install(The documentation says only use the latter, but that doesn't seem to work on Slack.)Now, insert your driver CD and mount it. cd to wherever the Windows XP driver is. Now, run: mkdir ~/wireless-driver && cp -r * ~/wireless-driver from the Windows XP folder.cd ~/wireless-driver(Better still be root )Run ls *.inf. After you find the .inf file, run: ndiswrapper -i ./filename.inf. (filename being the .inf file's filename, of course ) If it worked, ndiswrapper -l will report if your driver and hardware have been found.Has the driver been found? Run modprobe ndiswrapper to load the kernel module.Use iwconfig to configure your card; the NdisWrapper INSTALL file (which I've based most of this on) and man iwconfig will be able to tell you more.Once it's configured, run ifconfig wlan0 up (or wlan1 or whatever your system uses).ndiswrapper -m should automate the process.Extra Steps for Slackware(No slacking off here! )It took me forever to get my wireless card working on Slackware, because it failed to automate the first hundred times, but I got it working. The trick is to create a file called /sbin/startwireless and then set /etc/rc.d/rc.inet1 to run this new command. Make sure it's executable!! (chmod 755 /sbin/startwireless)Now, the commands I have are:

You can change the IP address on the third line; this is the card's address, and you should obviously change it for each system if you have more than one. I prefer this one because it doesn't interfere with my other devices, and it lets me have a fixed internal IP address on my network for if I want to set up port forwarding to run a Web server on my PC or something. (I've done it before.)By the way...Don't forget the very last line!! That's the most important one!! (The one that took me forever to find ) It sets up DHCP on the wireless card, which is very important!!

Thanks Martin ! . . . . do expect a few PMs from people that have questions on this, because it seems quiete a hack :PB) Bruno

SWAPPINESS ( The Great Swappiness Discussion ) . . . . . . . . . . . . . . . . . . . . HANDLE WITH CAREThis is a complicated issue: there has been a discussion about the use of swap and the 2.6 kernel . . . . . and there are two sides to this issue, one says lower the default "swappiness" number the other side says put it to the max.Now the default setting for Mandrake is 60 . . . . the maximum is 100, the minimum is 0. and on cooker they advise to put it at 10.You can see what the current ( default ) swappiness is by doing:

# cat /proc/sys/vm/swappiness

You can change the default by adding a line to "/etc/sysctl.conf" , the line should be

Another source of slow downs is currently the kernel swappiness,which let the kernel swap to disk even if there is no need(at least IMHO) for doing that; there is a parameter called vm.swappiness, which defines the attitude of kernel to swap.Currently the default value is 60, but lowering to 10 or 5 would cause the machine to be better responsive, e.g. adding "vm.swappiness=10" to "/etc/sysctl.conf"

Now, here is my take: I tried a few settings on my boxes and really can not notice the difference . . . . but that might be just because my boxes run really smooth, have enough CPU and RAM.So if you have little RAM, your KDE is slow or whatever, have a try but don't expect too much from this. . . . . on the other hand: you never know it might work for you ! . . . . . . . . . . . . . . . . . . . . HANDLE WITH CARE Bruno

SLACKWARE TIPS 3 WARNING: Since Slackware 12.0 uses the 2.6 kernel, HAL and D-Bus this Tip is obsolete !( In Slack 12.0 No entries in /etc/fstab for the CD and DVD devices are needed. Just adding yourself to the plugdev group solves mount problems for CD and DVD. ) CD-ROM and CD-RW drives in Slackware There is a note addressed to root in an internal mail on every Slackware install, basically it says this: "You can pass the "hdc=ide-scsi" option on a boot disk command line ( Or include in the append line of lilo ). Once you do this, your CD-RW device will appear as a SCSI device (/dev/scd0) rather than an IDE device (/dev/hdc). If this is the only CD-ROM type device in the machine (there's no DVD drive, for instance), then you'll probably also want to change your /dev/cdrom symbolic link to point to the new SCSI device instead of the old IDE device:"

# rm /dev/cdrom # ln -sf /dev/scd0 /dev/cdrom

Also, Rolana indicated that if you have the CD-ROM on hdb and the CD-RW on hdc you might want to change the permissions on hdb if you want to be able to listen to music CDs from the CD-ROM:

chmod 777 /dev/cdrom

Multiple CD devices and fstab In most cases Slack only sets up one CD device in /etc/fstab . . . it is simple to add the DVD or CD-RW yourself . . . check with "ls -al" where /dev/cdrom links ( hdb or hdc ) and make your lines like this:

BAD BLOCKSThere is a way to check for bad blocks on your hard drive in Linux and the command is even quite simple:A quick check of only one partition: ( read-only mode )

# badblocks -v /dev/hda1

Note: A full 180 GB drive ( # badblocks -v /dev/hda ) takes about 45 minutes. Be sure not to use the partition you are checking.A longer, more extended check of one partition ( non-destructive read-write mode )

# badblocks -n -v /dev/hda1

Note: The read-write check can best be done on a partition that is not mounted.You can find more info about the badblocks command: "man badblocks" Bruno