![]() ![]() |
Jan 8 2004, 07:26 PM
Post
#234
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
NVIDIA DRIVERS
NOTE: Installing the nVidia drivers is no easy task for novices. At least you will need to be comfortable with the commandline and the Vi-editor ( see Vi revisited because all is done in text mode and you have no GUI while doing this. QUOTE 1) Download the drivers ( http://www.nvidia.com/content/drivers/drivers.asp ) What it does not say here in these instructions is that you have to be in runlevel 3 to install the drivers . . . . . : The safest way to do this is to change your /etc/inittab file: CODE $ su < password > # kedit /etc/inittab Change the line: "id:5:initdefault:" in "id:3:initdefault:" and save the file CODE # reboot QUOTE 2) Type "root" to get root access, cd to the directory where you downloaded the file and type the following: # sh NVIDIA-Linux-x86-1.0-5328-pkg1.run ( adapt package number to the one you downloaded 3) You'll be greeted with the license which asks you to accept or deny it. 4) If you had previous GLX drivers and kernel modules installed, such as the RPMs, you will be prompted to remove them. 5) Next, the utility will check for and return with either a module if your kernel is supported or a statement that you will need to build a module if your kernel is not supported. 6) When you select OK, the utility will either download and install the pre-compiled module or download and compile a module then proceed to install the rest of the driver package. You should receive a message proclaiming the installation was a success. Proceed to the section below before restarting X or rebooting. 7) Open your /etc/X11/XF86Config-4 file with the Vi text editor ( one of the few that works in text mode): CODE # vi /etc/X11/XF86Config-4 NOTE: when using Xorg the file is /etc/X11/xorg.conf < i > ( put vi in insert mode ) QUOTE Under section "Module" there should be a: Load "glx" If you have these lines, nVidia advises you to remove them: Load "dri" Load "GLcore" Now scroll down to the 'Graphics device section' ( or sometimes just named 'Device' ). Instead of the default XFree driver: Driver "nv" Change to: Driver "nvidia" Make the above changes, save the file: < Esc > < ZZ > And start the X server with: CODE # startx ( to test if it works )NOTE 1: In the "module" section it is sometimes better to replace CODE Load "glx" With: CODE Load "/usr/X11R6/lib/modules/extensions/libglx.so" Anyway that is the way I always set it up in Mandrake.NOTE 2: If all works well you can change the /etc/inittab file back to "id:5:initdefault:" and reboot. NOTE 3: ( Alternative for the "id:3:initdefault:" part ) If you know what you're doing you can also exit X and go to text mode with: Press "Ctrl+Alt+F2", then log-in as "root" and type "init 3", then again you have to login as root. When ready type "init 5" to get back to runlevel 5. Additional info: nVidia README( You might want to print this out because once you are in text mode it will be hard to browse to the site and read it. Contains an extensive FAQ. ) -------------------- |
|
|
|
Jan 16 2004, 07:09 PM
Post
#235
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
ATOMIC CLOCK
CODE $ su < password > # rdate -s clock-1.cs.cmu.edu && hwclock --systohc The first part updates your system time, the second part ( after the && ) updates the BIOS clock, so if you only want your system time updated leave the "&& hwclock --systohc" off. For the real time fanatics we can even automate the process . . . ( well isn't that what computers are for ? You can add the line above at the end of /etc/rc.d/rc.local to make it update every time you boot. Of course you need a broadband connection that is started during boot for it to be effective. NOTE: You will need to have "rdate" installed ( check your package manager PS: If you get an odd time, rightclick the clock, select "Adjust Time and Date" and check if the timezone is set correctly -------------------- |
|
|
|
Jan 20 2004, 07:36 PM
Post
#236
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
CDRECORD
( NOTE: for the new 2.6 kernel, see the remark in the PS at the end !! ) CDrecord is the default commandline cd burning tool in Linux . . . simple and effective For burning ISO's it's pretty straightforward: CODE cdrecord dev=0,0,0 distro.iso But if you want to burn files and directories to CD it requires a bit more: first we will have to use the "mkisofs" command to make an iso of the files. If you want to use the CD in linux, the following arguments are recommended: CODE mkisofs -R -r -v -o filename.iso file1 file2 file2 dir1 dir2 -R is for Rock Ridge extensions-r is to preserve the UID/GID info -v is more output so you can see what is going on -o is to set the name of the outputfile ( filename.iso ) After making the ISO you can check the content of the ISO with: CODE isoinfo -f -R -i filename.iso Now we can burn the ISO to CD, first we have to know the "dev=" numbers: CODE cdrecord --scanbus ( NOT with 2.6 kernel !! )The output will end like this: CODE scsibus0: 0,0,0 0) 'LITE-ON ' 'LTR-16102C ' 'US52' Removable CD-ROM 0,1,0 1) * 0,2,0 2) * 0,3,0 3) * 0,4,0 4) * 0,5,0 5) * 0,6,0 6) * 0,7,0 7) * And in this case it will show you the numbers are 0,0,0 Now we can burn: CODE cdrecord -v dev=0,0,0 filename.iso Or we can give a few extra arguments: CODE cdrecord -v -multi -eject speed=16 dev=0,0,0 filename.iso This will allow a multisession disk that will be ejected after burning at speed x16 Sure, I know, this all seems complicated, and K3b ( the GUI front-end for cdrecord ) looks simpler to use . . . but once you have learned to do it this way you will see that the commandline is better and puts all your computer power in the burning and not in the fancy GUI More about CD and DVD commandline burning, read Here PS: NOTE: For the new 2.6 kernel things have changed for CDrecord . . no more "--scanbus" but now we do "dmesg | grep CD" to determine the device: In Mandrake 10, and probably soon in other distro's with the 2.6 kernel, first do CODE # dmesg | grep CD to see what /dev/hd?? your burner is located . . and then: CODE # cdrecord dev=/dev/hdc filename.iso That is all . . . . See also: http://forums.scotsnewsletter.com/index.ph...=503&st=255 for the reason why this change is. -------------------- |
|
|
|
Jan 27 2004, 04:34 PM
Post
#237
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
SLACKWARE TIPS ( 2 )
Making poweroff and reboot buttons In Slackware when we want to power-off we need to give the command "shutdown -h now" as root in a terminal. ( Because there is no entry for shutdown in the menu We can make a power-off button, but it needs some work, here is how to do that: We need to edit the sudoers file, as root, with vi ( study the Vi editor before you do this, see notes below ! ). . There is a special command to open the sudoers file in vi though . . NOT "vi sudoes", but: CODE # visudo This will open the file in vi . . so press "i" to put vi in insert mode an paste the next line at the end of the file: ( you need to do this for every user you will allow to reboot and halt ) CODE bruno ALL=(ALL) NOPASSWD: /sbin/shutdown -h now, /sbin/reboot Then save and close the file: <Esc> <ZZ> We now gave "bruno" sudo permission to give the commands "sudo /sbin/reboot" and "sudo /sbin/halt" and we can meke special buttons on the tastbar: Rightclick on the taskbar and choose "Add" --> "Special Button" --> "Non-KDE application" . . you will get a little GUI where you can put in the top box ( Executable ): CODE sudo /sbin/reboot . . . and press on the icon to change the icon to the one you like CODE sudo /sbin/shutdown -h now And every user you did add in the sudoers file will be able to press the buttons and reboot or halt the system.That should do the trick. Have FUN NOTE: More about editing with Vi: Vi ( Revisited ) Tip -------------------- |
|
|
|
Feb 4 2004, 06:14 PM
Post
#239
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
CUPS
CUPS (Common UNIX Printing System) can be used instead of the default LPR printing system. And there is a good chance if your printer does not work with LPR it will with CUPS. In a post from Striker we found a good way to set it up: QUOTE (Striker @ forum) If you use CUPS,you must make sure the lpd service is stopped and the cups service is started: If I remember well, I had to be root for this : /sbin/service lpd stop /sbin/service cups start Also if there's a services configuration tool in Slack, use it to configure your system to start the cups service automatically (and disable the lpd service if it is running). After the cups daemon is started, open a web browser and connect to the cups server: http://localhost:631 Then you have to add the printer in the Cups Configuration Interface. When you did get that far, it's probably working, so we go on: to add a printer, click Manage Printers and then the Add Printer button. It'll ask for username and a password. I did have to use root as the username and my rootpassword . NOTE: If you see your printer in the cups drivers list, but not the exact version number of the printer, you could try a few other versions at random, and most of the time you will be able to find a version number that will use the same drivers. This is not ideal and the quality may not be 100% but at least you will be able to print. Now, once you have set up CUPS you will notice it will print in KDE programs, but not in OpenOffice . . . Here is a trick you can try, type in a console: CODE /usr/lib/openoffice/program/spadmin ( Check the path because this is the one for Mandrake 9.2 . . . . "/openoffice/program/spadmin" is the fixed part you can "locate" ) You will get a dialog where the generic printer is preselected . . . . click on properties . . . you will see that the command is "lpr" . . . . . replace that with "kprinter -stdin" . . . . and save. Why ? Koffice and KDE are just configured to use CUPS and not "lpr" . . NOTE: You might have to clear the printer lpr queue first, delete the old jobs that are not finished and still blocking the process ( even after a reboot ): CODE $ lprm - ( "lprm" will remove the active job, "lprm -" will remove all jobs ) All info on CUPS and printing: CUPS Quick Start at Linuxprinting.org -------------------- |
|
|
|
Feb 10 2004, 06:24 PM
Post
#240
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
APROPOS
Because Linux knows so many commands you can impossibly remember them all, that is why there are a few tricks available to help you. We already know from previous tips that if you type the first few characters of a command and press the <tab> key, it will autocomplete the command or give a list of options. Also we had the whatis command a few tips ago this showed a line of text explaining what a command was for. Here is another clever command: "apropos". Imagine you know only a part of the name or description of a command, let's take an example like "alsa" CODE $ apropos alsa Returns to the screen: CODE aconnect (1) - ALSA sequencer connection manager alsaconf (8) - configuration tool for the Advanced Linux Sound Architecture alsactl (1) - advanced controls for ALSA soundcard driver alsamixer (1) - soundcard mixer for ALSA soundcard driver, with ncurses interface alsaplayer (1) - plays various sound files amixer (1) - command-line mixer for ALSA soundcard driver aplay (1) - command-line sound recorder and player for ALSA soundcard driver aplay [arecord] (1) - command-line sound recorder and player for ALSA soundcard driver arecord (1) - command-line sound recorder and player for ALSA soundcard driver arecord [aplay] (1) - command-line sound recorder and player for ALSA soundcard driver aseqnet (1) - ALSA sequencer connectors over network Well, that is pretty cool isn't it ?? . . . . . . . cool ?: CODE $ apropos cool Smalledit-3.17.7 [smalledit] (1) - Stripped down version of Cooledit - a full-featured text editor for the X Window System cooledit (1) - 3.17.7 - Full featured text editor for the X Window System, Version 11 coolicon (1) - 3.17.7 - Icon manager with graphical icon configuration and drag and drop support. Written under the Coolwidget library coolman (1) - 3.17.7 - Man page reader for the X Window System based on the Coolwidget library Have fun exploring ! -------------------- |
|
|
|
Feb 18 2004, 06:25 PM
Post
#241
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
ULTIMATE BOOT CD
The absolute tool Looking for the Active Killdisk version for Linux I came upon this tool . . . does not only have the tool I was looking for but a whole bundle more: QUOTE Hard Disk Installation MaxBlast 3 (Maxtor) DiscWizard 2003 (Seagate) Hard Disk Diagnosis Drive Fitness Test (IBM/Hitachi) PowerMax (Maxtor/Quantum) DLG Diagnostic (Western Digital) SeaTools Desktop (Seagate) Diagnostic Tool (Fujitsu) SHDIAG (Samsung) HUTIL (Samsung) Data Lifeguard (Western Digital) Hard Disk Device Management IBM/Hitachi Feature Tool AMSET (Maxtor) UATA100 (Seagate) Ultra ATA Manager (Western Digital) SMARTUDM ATA Password Tool Hard Disk Wiping AutoClave Active@ KillDisk Free Edition Darik's Boot and Nuke Hard Disk Cloning HDClone (Free Edition) g4u Partition Tools Ranish Partition Manager XFDISK (Extended FDISK) SPFDISK (Special FDISK) TestDisk Partition Resizer SavePart Free FDISK MBRtool MBRWork Boot Managers Smart BootManager Gujin File Managers DOS Navigator File Maven NTFS Tools Offline NT Password & Registry Editor Active NTFS Reader for DOS EditBINI Memory Diagnosis Memtest86 Memtest86+ Windows Memory Diagnostic DocMem RAM Diagnostic DOS Boot Disks Bart's Network Boot Disk Bart's CDROM Boot Disk FreeDOS Boot Disk Linux-based Rescue Disks Tom's Boot Disk Recovery Is Possible (RIP) BasicLinux Trinux System Information AIDA16 NSSI PC-Config PCI Benchmarks System Speed Test 32 Antivirus Tools F-Prot Antivirus for DOS (Personal use only) McAfee Antivirus Scanner BIOS Tools CMOS Password Recovery Network Tools Freesco Homepage: http://www.ultimatebootcd.com/ IMPORTANT: Make sure you get the "normal" version of the UltimateBootCD and not the WindowsUBCD ( with Bart's PE ). Downloading from one of the sites listed on http://www.ultimatebootcd.com/ ( in ISO format ) will asure you that you have the correct version. -------------------- |
|
|
|
Feb 25 2004, 08:08 PM
Post
#242
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
SWARET ( For Slackware )
Swaret is magical and an easy script designed to help keep your Slackware System up-to-date. It downloads, upgrades and installs packages, patches, sources and much more! Swaret includes dependency support, as well as it tracks and fixes missing libraries. There is no better tool to keep your Slackware up to date and sane. Get the latest Swaret: http://swaret.sourceforge.net/index.php OR The 1.6.2-noarch-1.tgz is here By mistake the file on the mirror is named swaret-1.6.2-noarch-1.tgz.tar so we have to rename the file in order to remove the last part ( .tar ): CODE # mv swaret-1.6.2-noarch-1.tgz.tar swaret-1.6.2-noarch-1.tgz Next you can install it: CODE # installpkg swaret-1.6.1-noarch-3.tgz ( Adapt version number with the one you downloaded )Configure it: CODE # cp /etc/swaret.conf.new /etc/swaret.conf Edit the /etc/swaret.conf file, first set the version: QUOTE (swaret.conf @ file) # NOTE: If you want to use Slackware Linux Current, # set VERSION to 'current' (VERSION=current). # VERSION=??.? <---------------------------------------------- Put the version you use here ! NOTE: Switching to current is experimental and is not advised for new users. ( Attention dial-up users, upgrading to “current” will download more then 800 MB packages. So my advice is keep the version you downloaded/installed. ) And next: "EXCLUDE=alsa" QUOTE (swaret.conf @ file) # Basic Exclude # EXCLUDE=kernel EXCLUDE=lilo swaret EXCLUDE=MANIFEST.bz2$ EXCLUDE=-*dl$ -*PACKAGER$ -*MYBUILD$ EXCLUDE=alsa <----------------------------------------------- add this one !! And for resolving dependencies, replace these lines: QUOTE DEP_ROOT=http://www.swaret.org/swaret DEP_ROOT=ftp://ftp.swaret.org/swaret With: QUOTE DEP_ROOT=http://swaret.sourceforge.net/libraries-$VERSION Finally, here is how to update/upgrade: CODE # swaret --update ( -a is for automatic . . . dial-up users prefer not to use this )# swaret --upgrade -a A few basic commands: swaret --update ( updates list of packages ) swaret --list ( shows packages list ) swaret --upgrade -a ( upgrades system -a automatically ) swaret --remove xxxxx ( removes packages xxxxx ) swaret --install xxxxx ( installs package xxxxx ) NOTE for dial-up up users: Dial-up users have to change another line in the /etc/swaret.conf as well: Change NIC=eth0 to NIC=ppp0 QUOTE (swaret.conf @ file) # Network Settings # # Network Interface # Use this if you have a Network Interface. # NIC=ppp0 <--------------------------------------------------------------------- Here # # Local Interface # Use this if you do not have a Network Interface. # PS: The Swaret FAQ and the Swaret forum are here: FAQ: http://swaret.sourceforge.net/index.php?name=FAQ Forum: http://swaret.sourceforge.net/index.php?na...&file=index Old Swaret HowTo: Old HowTo Old Swaret FAQ: Old FAQ Old Swaret Man: Old Man Pages -------------------- |
|
|
|
Mar 3 2004, 04:16 PM
Post
#243
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
FILE SYSTEM COMMANDS:
Here is a list of all the filesystem management tools. It is only an overview. If you want to know more about a specific command and the parameters that can be used with it, see the man pages or help files of the commands. ( Example: "man badblocks" or "badblocks --help" ) badblocks . . . . . . Searches a device for bad blocks cfdisk. . . . . . . . . . Creates or deletes partitions from the partition table dosfsck . . . . . . . . Checks msdos filesystems dumpe2fs. . . . . . . Lists superblock information for the specified device e2fsck . . . . . . . . . Check and/or repair Linux filesystems Ext2/3 fdformat. . . . . . . . Performs s lowlevel format on a floppy fdisk. . . . . . . . . . . Adds or removes partitions. Can also be used to view partition table information. fsck. . . . . . . . . . . Check and/or repair Linux filesystems hdparm . . . . . . . . Reads or sets hard disk parameters mkdosfs. . . . . . . . Creates an msdos filesystem mke2fs. . . . . . . . . Creates a native Linux filesystem mkfs. . . . . . . . . . . Also creates native Linux filesystems mkswap. . . . . . . . Creates a Linux swap partition mount . . . . . . . . . Mounts a filesystem stat . . . . . . . . . . . Prints inode information swapoff . . . . . . . . Releases a swap partition swapon . . . . . . . . Activates a swap partition tune2fs . . . . . . . . Adjusts ext2 filesystem parameters umount . . . . . . . . Unmounts a filesystem With all the multibooters on the forum, all dividing their harddisks to a high amount of small partitions, a little tip on file system commands was not a luxury. ( Apparently on an IDE drive, 64 logical partitions is the max on an extended one . . . so: Have fun penguins and penguinettes ! -------------------- |
|
|
|
Mar 11 2004, 05:56 AM
Post
#244
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
FILESYSTEMCHECK 2 ( fsck )
Here is one command of the previous Tip I would like to elaborate: fsck If you have a corrupt file system ( Ext2/3 ) and you have to do a manual check and repair on it in "single user mode", here are 4 ways how to do it: 1). If you are booting from Mandrake's Lilo the story is simple: choose option "failsafe" from the menu, this will boot you automatically, without any hassle, in "single user mode" ( you get an odd looking prompt like "sh-2.05b#" ) and you can do: CODE # fsck /dev/hdb1 ( replace hdb1 with the partition you want to run the check on )2). Other graphical Lilos allow you to do Ctrl+X to get a prompt where you type: CODE linux single it will than also boot in "single user mode"3). Another option is to flip in any Linux CD ( Live or install ) and at the prompt type CODE linux single ( For knoppix it is "knoppix single" )4). Now, in case you did already boot, but the boot failed half way before getting to X, and you are thrown back at the text screen with a prompt. Here is how to do it if you are in runlevel 3: Put it in "single user mode", ( back to runlevel 1 ): CODE # init 1 Then remount / in read only mode: CODE # mount -o remount,ro / ( replace hdb1 with the partition you want to run the check on ) # fsck /dev/hdb1 Most of the times the -a, -A and -P options are not recommended, see "man fsck" Then remount / in readwrite mode: CODE # mount -o remount,rw / Last step, back to where you came from: CODE # init 3 The chances are that your file system will be fixed, but there is no guarantee. The chance that you will have to do this are much slimmer on an Ext3 file system then on Ext2. So there is one more reason you always choose an Ext3 format PS: Here is how to do it with Grub -------------------- |
|
|
|
Mar 17 2004, 03:27 PM
Post
#245
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
FDISK ( Partition table manipulator for Linux )
Here is another command from the list "File System Commands". With fdisk we can get info on partitions and make new ones or delete them. I took the info from a post made by Owyn. Info about partitions: CODE # fdisk -l /dev/hda Deleting partitions: CODE $ su # fdisk /dev/hda 1)List the partitions and make sure you are on hda Press "p" 2)Delete all the existing partitions on hda starting with partition 4 and working back to partition 1 Press "d" Enter partition number when requested. 3)List the partitions again to make sure the problem is fixed. Press "p" 4)Write table to disk and exit Press "w" And then run "fdisk -l /dev/hda" again to see the results. Here is a full list of the commands you can use in fdisk: CODE Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Erase the complete harddrive: CODE $ su # dd if=/dev/zero of=/dev/hda bs=1024 count=10 CAUTION: MAKE SURE YOU ARE WORKING ON THE CORRECT HD !!!! More on fdisk: http://www.justlinux.com/nhf/Installation/...sing_fdisk.html -------------------- |
|
|
|
Mar 18 2004, 03:17 PM
Post
#246
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
APT-GET & SWARET ON DIAL-UP
Apt-Get: These were the questions: Can these downloads be broken up into smaller chunks and downloaded in groups? What can one do to avoid a total reinstall, etc. in the event of a crash? That would be a tremendous task for someone on dialup? QUOTE (Jodef @ forum) Pclos synaptic saves the packages to /var/cache/apt/archives when you choose to execute in synaptic there is a small checkbox at the bottom check download package files only this d/ls package but doesn't automatically install them. If this option is not checked once the install is performed the package is deleted from that directory. You can then copy the packages from that directory and save them wherever you choose. To reinstall the packages you can just copy the packages to /var/cache/apt/archives and run synaptic just as you normally would but because the files are available locally in the designated directory it will not need to redownload the files but it will install them. At least in theory I have tested this with one or two packages but not with a whole upgrade but I think it should work the same. A few handy commands if you use apt-get on the commandline: "apt-get -d kde" would only download the KDE packages and not yet install them so you can burn them to CD first "apt-get check" verifies that there are no broken dependencies . . . "apt-get upgrade" will only get the regular updates . . ( you get to say Y or N ) "apt-get dist-upgrade" will totally upgrade your distro to the latest version "apt-get --help" for more info on apt-get Swaret: For Swaret the packages get stored in /var/swaret/sources The command "swaret --get KDE" will only download the packages and save them to /var/swaret/sources. Interrupted downloads will be checked and downloaded again, swaret performs a checksum on the packages. So if you burn the packages in /var/swaret/sources to CD you can always recover them. "swaret --get kde" will only download the kde pakages "swaret --dep" will check dependencies "swaret --resume" will resume broken downloads See also the dial-up remarks in the Swaret Tip Original thread: http://forums.scotsnewsletter.com/index.ph...f=14&t=6057 -------------------- |
|
|
|
Mar 25 2004, 04:02 PM
Post
#247
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
PCLOS TWEAKS ( Preview 5 and 7 )
Here is a quick few tips for fixing a couple of things after the HD install, and further down for after upgrading: After HD install 1). The fancy icons in Open Office will be gone if you create a user account, do: CODE # cp -r /root/.openoffice/user/config/soffice.cfg /home/bruno/.openoffice/user/config ( Replace "bruno" 2). The nice mouse pointerwill be gone after the creating of a user account, do: CODE # cp -r /root/.icons/ /home/bruno/ After upgrade 1). The KDE startup sound will be changed to the default KDE tune . . . to get Texstars tune back ( what is the name of that track ? ) do boot from the CD and: CODE # cp /initrd/loopfs/usr/share/sounds/KDE_Startup.wav /mnt/hda6/usr/share/sounds/TEX_Startup.wav ( Change the hda6 to the partition the PCLos HD install is on. Also this changes the name of the .wav to TEX_Startup.wav because KDE_Startup.wav already exists, so when you go in the "notify" section of KDE Control Center, that is the file to look for. ) 2). The "/etc/apt/sources.list" will be replaced and set the default to the ibiblio mirrors . . . change it back to "nluug" for quick downloads. 3). Upgrading to Mozilla 1.6 will make that the plugins in the Konqueror browser not work anymore because it points to the Mozilla 1.5 directory. Go to preferences of konqueror and in the plugins section add: CODE /usr/lib/mozilla-1.6/plugins/ 4). After the upgrade the entries in the KDE Control Center will be empty . . . . do this: QUOTE (Texstar @ PCLos forum) 1. update to the latest menudrake and menu rpms from apt-get 2. delete everything in the /etc/menu directory 3. delete the applnk-mdk and applnk-mdk-simplified directory in .kde/share 4. delete the .menu directory in home 5. update-menus -v when it stops press return to get to the konsole prompt 6. run menudrake and save 7. check your kcontrol to make sure everything is still there. Now you should be able to edit your menus as needed and not lose kcontrol settings. 5). There is a very cool cursor theme chooser program for PCLos and Mandrake 9.2, including a bundle of different cursor themes. You can get the program here: ftp://ftp.nluug.nl/pub/os/Linux/distr/Man...1mdk.noarch.rpm Once downloaded install it ( as root ) with: CODE # rpm -ihv cursor_themes-0.0.4-1mdk.noarch.rpm Then run the program as normal user with: CODE $ choose_cursor and you will get a small GUI window where you can choose from 45 different themes Other language in PCLos For KDE you need these packages: ( Example is Dutch=nl ) locales-nl-2.3.2-5mdk.i586.rpm ( From Mandrake 9.2 CD ) kde-i18n-nl-3.2.0-2mdk.noarch.rpm ( From Mandrake 10.0 CD, because it is KDE 3.2 ) For OpenOffice: myspell-nl_NL-1.0.2-0.20030824.1mdk.i586.rpm ( From Mandrake 9.2 CD ) myspell-hyph-nl-1.0.2-0.20030824.1mdk.i586.rpm ( From Mandrake 9.2 CD ) OpenOffice.org-l10n-nl-1.1-2.92mdk.i586.rpm ( From Mandrake 9.2 CD ) PS: You can download them from ftp.nluug too For 9.2: ftp://ftp.nluug.nl/pub/os/Linux/distr/Man...6/Mandrake/RPMS For 10.0: ftp://ftp.nluug.nl/pub/os/Linux/distr/Man.../Mandrake/RPMS/ Have FUN with PCLos ! -------------------- |
|
|
|
Mar 31 2004, 04:07 PM
Post
#248
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
CPU INFO ( and other information on your system )
We can get a lot of info from the /proc directory ( The /proc is a direct reflection of the system kept in memory ) An example of the info we can get from /proc is "CPU info": CODE $ cat /proc/cpuinfo That is pretty good info isn't it ? . . But that is not all, there is a lot of other real-time information on your system in /proc, try:processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 6 model name : AMD Athlon(tm) Processor stepping : 2 cpu MHz : 1595.353 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow bogomips : 2182.34 CODE $ cat /proc/devices ( System block and character devices ) $ ls /proc/driver ( Shows The drivers you can "cat", example: "cat /proc/driver/rtc" ) $ cat /proc/filesystems ( Lists supported filesystems ) # cat /proc/kmsg ( As root ! kernel messages . . close with Ctrl+C ) $ cat /proc/modules ( A list of loaded drivers ) $ ls /proc/net ( A directory with networking subdirectories ) $ cat /proc/partitions ( All partitions your kernel recognizes ) $ cat /proc/pci ( Devices in the pci slots ) $ ls /proc/sys ( Directory with system information you can "cat" ) $ cat /proc/version ( Kernel version, the gcc it was commpiled with, etc . . . ) So you see there is a wealth of info you can retrieve from /proc . . . go off and explore, even if you do not understand all the info, it is good to know where you can get it PS: Brian wrote us that with "lshw" ( if installed on your distro ) you can query all that /proc info and print it to your screen. Try "lshw -html >lshw.html" and you will get a nice html file in your home directory for easy viewing. -------------------- |
|
|
|
Apr 7 2004, 02:34 PM
Post
#249
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
IMAGEMAGICK
ImageMagick is an ultra versatile tool that can manipulate images on the commandline. You will find it installed by default in most distros. Just to give you an idea what it can do, here is a few examples: import - Take a screenshot of the full desktop: CODE $ import -window root screenshot.png ( When the command is typed in a 'run-box' and you click on the desktop it will take the full desktop too and you won't see the open terminal where you typed the command )Takes screenshot of an open window: CODE $ import screenshot.png Then click on a window.Take a screenshot of any ( detail ) part of the desktop: CODE $ import screenshot.png Then make a selection with your right mouse button.A simple way to display the screenshot: ( or any other image ) CODE $ display sceenshot.png Now comes the real 'magic': mogrify - To transform a .png image to .jepg: CODE $ mogrify -format jpeg screenshot.png To transform a whole series of .png images to .jpeg: CODE $ mogrify -format jpeg *.png NOTE: Imagemagic can handle and transform all possible image formats ! ( See below ) And to make a series of thumbnails: CODE $ mogrify -geometry 120x120 *.jpg ( Don't worry about disfiguring the image, it will take the first number and adapt the second one to it to make sure the proportions stay the same ) WARNING: "mogrify" overwrites the original image, so make a backup before you start ! What else can it do? - Resize, rotate, sharpen, color reduce, or add special effects to an image - Create a montage of image thumbnails - Create a transparent image suitable for use on the Web - Turn a group of images into a GIF animation sequence - Create a composite image by combining several separate images - Draw shapes or text on an image - Decorate an image with a border or frame - Describe the format and characteristics of an image Here are the commands you can use in Imagemagic: QUOTE display is a machine architecture independent image processing and display facility. It can display an image on any workstation display running an X server. import reads an image from any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen. montage creates a composite by combining several separate images. The images are tiled on the composite image with the name of the image optionally appearing just below the individual tile. convert converts an input file using one image format to an output file with the same or differing image format while applying an arbitrary number of image transformations. mogrify transforms an image or a sequence of images. These transforms include image scaling, image rotation, color reduction, and others. The transmogrified image overwrites the original image. identify describes the format and characteristics of one or more image files. It will also report if an image is incomplete or corrupt. composite composites images (blends or merges images together) to create new images. compare compares an image to a reconstructed image. conjure interprets and executes scripts in the Magick Scripting Language (MSL). The formats ImageMagick can handle: 8BIM - Photoshop resource format AFM - TrueType font APP1 - Photoshop resource format ART - PF1: 1st Publisher AVI - Audio/Visual Interleaved AVS - AVS X image BIE - Joint Bi-level Image experts Group interchange format BMP - Microsoft Windows bitmap image CAPTION - Caption (requires separate size info) CMYK - Raw cyan, magenta, yellow, and black samples CMYKA - Raw cyan, magenta, yellow, black, and matte samples CUT - Dr Halo DCM - Digital Imaging and Communications in Medicine image DCX - ZSoft IBM PC multi-page Paintbrush DIB - Microsoft Windows bitmap image DPS - Display PostScript DPX - Digital Moving Picture Exchange EPDF - Encapsulated Portable Document Format EPI - Adobe Encapsulated PostScript Interchange format EPS - Adobe Encapsulated PostScript EPS2 - Adobe Level II Encapsulated PostScript EPS3 - Adobe Level III Encapsulated PostScript EPSF - Adobe Encapsulated PostScript EPSI - Adobe Encapsulated PostScript Interchange format EPT - Adobe Encapsulated PostScript with TIFF preview FAX - Group 3 FAX FILE - Uniform Resource Locator FITS - Flexible Image Transport System FPX - FlashPix Format FTP - Uniform Resource Locator G3 - Group 3 FAX GIF - CompuServe graphics interchange format GIF87 - CompuServe graphics interchange format (version 87a) GRADIENT - Gradual passing from one shade to another GRANITE - Granite texture GRAY - Raw gray samples H - Internal format HDF - Hierarchical Data Format HISTOGRAM - Histogram of the image HTM - Hypertext Markup Language and a client-side image map HTML - Hypertext Markup Language and a client-side image map HTTP - Uniform Resource Locator ICB - Truevision Targa image ICM - ICC Color Profile ICO - Microsoft icon ICON - Microsoft icon IPTC - IPTC Newsphoto JBG - Joint Bi-level Image experts Group interchange format JBIG - Joint Bi-level Image experts Group interchange format JP2 - JPEG-2000 JP2 File Format Syntax JPC - JPEG-2000 Code Stream Syntax JPEG - Joint Photographic Experts Group JFIF format JPG - Joint Photographic Experts Group JFIF format LABEL - Text image format LOGO - ImageMagick Logo M2V - MPEG-2 Video Stream MAP - Colormap intensities MAT - MATLAB image format MATTE - MATTE format MIFF - Magick image format MNG - Multiple-image Network Graphics MONO - Bi-level bitmap in least-significant-byte-first order MPC - Magick Persistent Cache image format MPEG - MPEG-1 Video Stream MPG - MPEG-1 Video Stream MPR - Magick Persistent Registry MSL - Magick Scripting Language MTV - MTV Raytracing image format MVG - Magick Vector Graphics NETSCAPE - Netscape 216 color cube NULL - Constant image of uniform color OTB - On-the-air bitmap P7 - Xv thumbnail format PAL - 16bit/pixel interleaved YUV PALM - Palm Pixmap format PBM - Portable bitmap format (black and white) PCD - Photo CD PCDS - Photo CD PCL - Page Control Language PCT - Apple Macintosh QuickDraw/PICT PCX - ZSoft IBM PC Paintbrush PDB - Pilot Image Format PDF - Portable Document Format PFA - TrueType font PFB - TrueType font PFM - TrueType font PGM - Portable graymap format (gray scale) PICON - Personal Icon PICT - Apple Macintosh QuickDraw/PICT PIX - Alias/Wavefront RLE image format PLASMA - Plasma fractal image PM - X Windows system pixmap (color) PNG - Portable Network Graphics PNM - Portable anymap PPM - Portable pixmap format (color) PREVIEW - Show a preview an image enhancement, effect, or f/x PS - Adobe PostScript PS2 - Adobe Level II PostScript PS3 - Adobe Level III PostScript PSD - Adobe Photoshop bitmap PTIF - Pyramid encoded TIFF PWP - Seattle Film Works RAS - SUN Rasterfile RGB - Raw red, green, and blue samples RGBA - Raw red, green, blue, and matte samples RLA - Alias/Wavefront image RLE - Utah Run length encoded image ROSE - 70x46 Truecolor test image SCT - Scitex HandShake SFW - Seattle Film Works SGI - Irix RGB image SHTML - Hypertext Markup Language and a client-side image map STEGANO - Steganographic image SUN - SUN Rasterfile SVG - Scalable Vector Gaphics TEXT - Raw text TGA - Truevision Targa image TIF - Tagged Image File Format TIFF - Tagged Image File Format TILE - Tile image with a texture TIM - PSX TIM TTF - TrueType font TXT - Raw text UIL - X-Motif UIL table UYVY - 16bit/pixel interleaved YUV VDA - Truevision Targa image VICAR - VICAR rasterfile format VID - Visual Image Directory VIFF - Khoros Visualization image VST - Truevision Targa image WBMP - Wireless Bitmap (level 0) image WMF - Windows Metafile WPG - Word Perfect Graphics X - X Image XBM - X Windows system bitmap (black and white) XC - Constant image uniform color XCF - GIMP image XML - Scalable Vector Gaphics XPM - X Windows system pixmap (color) XV - Khoros Visualization image XWD - X Windows system window dump (color) YUV - CCIR 601 4:1:1 Now you know why it is called "ImageMagick" More info: http://www.imagemagick.org More commandline tricks: ImageMagick: A graphics wizard for the command line Also: Advanced image editing from the command line with ImageMagick And Command-line animations using ImageMagick And for the GUI version: Display -------------------- |
|
|
|
Apr 14 2004, 04:01 PM
Post
#250
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
SECURITY: SERVICES STARTED AT BOOT
Surely you are aware that at boot a good number of services are started, most of them you will see in the bootmessages. The story is that you do not need all those that are being started, you do need most of them but you can do some weeding out of the ones you do not need and are possibly a security risk. ( It can even reduce the time it takes to boot . . however, do not expect too much here, this will only be a few seconds ) Let me first list a few services you DO need and therefore should NOT deactivate: QUOTE apmd : Advanced Power Management Daemon atd : daemon for the at command. Runs "one-off" scheduled operations outside the cron daemon, as set by the command line. crond : provides a daemon to perform scheduled operations without user interaction daytime : provides the system's notion of the time of day echo : displays a line of text fam : the File Alteration Monitor. This server tracks changes to the filestystem, passing the information along to the appropriate application. keytable : provides the appropriate keyboard mapping partmon : monitors the contents of a partition, preventing writing : 0 byte files when the partition is full random : random number generator syslog : a system-wide logging utility xinetd : the Extended Internet Services Daemon Now, I will take as an example, Mandrake and PCLos, because they are very similar. Most other distros have equivalent tools to shut services down and stop them from starting at boot. In Slackware it is a bit more complicated but real Slackers will find a way to get the job done anyway. So, in Drake & PCLos . . . . in the menu under "Configuration" you will find "Configure your Computer" this brings up the Master Control Center ( same as MCC in Drake ) and there under "System" you have "DrakXServices" . . this brings up a GUI with all the services running ( or not ) and there is an info button at every item . . also there is a stop-button for every service where you can temporary stop the service and see if it affects the smooth running of your system ( on a reboot it will start again if you leave the checkmark . . the trick is: Note down every change you make ! Only if you are 100% sure you take away the checkmark ! -- A few services that are running by default in PCLos and that you can safely disable are: hpoj ( If you do NOT have a HP printer ) nfs ( to comunicate with other Linux computers on a network ) nfslock ( idem ) portmap ( server stuff ) postfix smb ( if you do not run samba to comunicate with a Windows computer on the network ) swat ( also samba related, admin tool for samba ) wlan ( wireless lan config/activate etc. ) -- You DO need: alsa anacron atd crond cups devfsd dm fam gmp internet iptables ( for the firewall to work ) keytable kheader pcscd random rawdevices services slpd sound tmdns xfs xinetd That is all for today ! . . Next time we will look at Servers/services. Okay, to give a little hint to you Slackware users: to disable a service from starting at boot look in the /etc/rc.d/ directory . . they will be there, as an example, to safely prevent sendmail from starting at boot ( you do not need sendmail to send mail ) and be sure that you can put it back on if you find that you made a mistake disabling it, do: CODE # mv /etc/rc.d/rc.sendmail /etc/rc.d/rc.sendmail.OLD To restore to the previous situation you simply do CODE # mv /etc/rc.d/rc.sendmail.OLD /etc/rc.d/rc.sendmail Have FUN securing your system ! -------------------- |
|
|
|
Apr 21 2004, 03:04 PM
Post
#251
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
SECURITY: SERVERS & SERVICES
You may not be aware of it but there are often running servers or sevices that listen to ports on your system that are unsafe. The SANS top 20 http://www.sans.org/top20/ QUOTE Top Vulnerabilities to UNIX Systems U1 BIND Domain Name System U2 Remote Procedure Calls (RPC) U3 Apache Web Server U4 General UNIX Authentication Accounts with No Passwords or Weak Passwords U5 Clear Text Services U6 Sendmail U7 Simple Network Management Protocol (SNMP) U8 Secure Shell (SSH) U9 Misconfiguration of Enterprise Services NIS/NFS U10 Open Secure Sockets Layer (SSL) So let us do some real work now to secure our system: There is this command ( as root ) CODE 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: CODE tcp 0 0 *:ipp *:* LISTEN 1758/cupsd ( This one is okay, the cups printer deamon, and needs to be running ! )Another command is: CODE 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: finger ftpd kdessh lockd mountd named or BIND nfsd rpc rlogin rsh sendmail ( Only needed if you run a mailserver ) snmp ssl ssh statd ruser telnetd 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: CODE # mv /etc/inetd.conf /etc/inetd.conf.OLD and replace it by an empty file: CODE # 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: QUOTE :0 local /bin/nice -n -10 /usr/X11R6/bin/X -deferglyphs 16 -nolisten tcp 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: CODE # mv /etc/rc.d/rc.sshd /etc/rc.d/rc.sshd.OLD -------------------- |
|
|
|
Apr 28 2004, 01:25 PM
Post
#252
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
SECURITY: ROOTKIT CHECKERS
A 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 CODE # 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 files The 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: CODE # 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: CODE # rkhunter --cronjob More info ? See the thread on the forum: http://forums.scotsnewsletter.com/index.ph...=ST&f=14&t=6506 Have FUN securing your system QUOTE (www.kanenas.net) 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. -------------------- |
|
|
|
May 4 2004, 02:28 PM
Post
#253
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
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: QUOTE (nlinecomputers @ Forum) 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 Great ! Thanks Nathan for this excellent explanation ! If after these statements you still think you need AV software: A free AV for Linux is F-Prot. You can get it here: http://www.f-prot.com/products/home_use/linux/ Links on security: Basic Slackware Security: http://www.oldskoolphreak.com/tfiles/hack/...k/slack_sec.txt More on Nmap: http://software.newsforge.com/software/04/...l?tid=78&tid=82 Nessus: http://www.nessus.org/demo/first.html For the more advanced, here is a series of articles on Linux security.These articles were written by Mike Peters and posted on Linux.com: Part 1: http://docs.linux.com/article.pl?sid=04/04...5/1913248&tid=2 Part 2: http://docs.linux.com/article.pl?sid=04/04...5/1918219&tid=2 Part 3: http://www.linux.com/article.pl?sid=04/04/15/1923224 -------------------- |
|
|
|
May 12 2004, 04:21 AM
Post
#254
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
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: CODE 0 * * * * play /home/bruno/Sound/Hour.wav ( Sure you need those sound files in the places indicated above ) See this link for the time settings: Cron Jobs 30 * * * * play /home/bruno/Sound/HalfHour.wav Then give the command: CODE $ 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 -------------------- |
|
|
|
May 20 2004, 03:11 PM
Post
#255
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
BACKING UP THE MBR
Here 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 and write to/from raw disks and files. If you have a floppy drive, creating a boot disk is as simple as putting a floppy in the drive and typing this: $ su <type password> # dd if=/dev/hda of=/dev/fd0 bs=512 count=1 This makes an exact copy of the MBR of the first hard drive, copying it to a floppy disk. You can boot directly from this floppy, and see your old 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 with this: # dd if=/dev/hda of=/home/john/boot.mbr bs=512 count=1 Then you can boot into a CD-ROM distribution such as Knoppix, or often use 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 directory where you backed up the MBR for the "if" parameter--this is an example). Cheers, -- John Locke Thanks John, nice one ! PS: Also, Striker shows us a way to write lilo to floppy: QUOTE (Striker @ Forum) For that open up a konsole, log in as ROOT and follow the below :
CODE /sbin/lilo -b /dev/fd0 -------------------- |
|
|
|
May 20 2004, 05:45 PM
Post
#256
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
CDRECORD and KERNEL 2.6
( If you want you can skip the intro and go to the "nutshell" at the bottom QUOTE (Warly @ Mandrakesoft) Mandrakelinux 10.0: to Burn or not to Burn The 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 CODE # dmesg | grep CD to see what /dev/hd?? your burner is located . . and then: CODE # 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. -------------------- |
|
|
|
May 26 2004, 05:28 PM
Post
#257
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
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 install Burn 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 OK Then the program will load into memory and proceed to go on as a normal install. HD install - Copy all the files from CODE ftp://ftp.nluug.nl/pub/os/Linux/distr/Mandrakelinux/official/2006.0/i586 to a directory ( /home/bruno/i586 ) on a partition on your HD Use Kget's integration in Konqueror and use the filemanager, OR The next command CODE 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 OK Then the program will load into memory and proceed to go on as a normal install. -------------------- |
|
|
|
Jun 2 2004, 04:02 PM
Post
#258
|
|
![]() Le Professeur Pingouin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Emeritus Posts: 37,904 Joined: 4-April 03 From: Amsterdam Member No.: 611 |
URPMI SOURCES MANDRAKE 10.0 Official
There 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: QUOTE (Bruno @ Tips) 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 CODE urpmi.addmedia plfplf ftp://mandrake-forum.org/pub/PLF/mandrake/10.0 with hdlist.cz Source Thacs: CODE urpmi.addmedia thacs.rpms http://rpm.nyvalls.se/10.0/RPMS with hdlist.cz Source Contrib CODE urpmi.addmedia contrib ftp://ftp.nluug.nl//pub/os/Linux/distr/Mandrake/official/10.0/contrib/i586 with ../../i586/Mandrake/base/hdlist2.cz Source Club contributions ( open to all ) CODE urpmi.addmedia club.contrib_ftp.nl.uu.net_i586_10.0Official ftp://ftp.nl.uu.net/pub/linux/Mandrakelinux/devel/testing/Mandrakeclub/10.0/i586 with hdlist.cz Source Eslrahc ( Link ) CODE urpmi.addmedia eslrahc http://www.eslrahc.com/10.0/ with hdlist.cz Source Norlug ( Link ) CODE urpmi.addmedia NORLUG-10.0 http://www.ibiblio.org/pub/mirrors/norlug/mandrake-10.0/RPMS/ with hdlist.cz More small ones: http://www.thebrix.org.uk/ Only for Club members: Source Club Commercial CODE urpmi.addmedia club.comm_i586_10.0Official http://NICKNAME:PASSWORD@www.mandrakeclub.com/downloads2/comm/10.0/ with ./hdlist.cz ( replace "NICKNAME" and "PASSWORD" ) Source Club Testing ( Be Careful With These !! ) CODE urpmi.addmedia testing_i586_10.0Official http://NICKNAME:PASSWORD@www.mandrakeclub.com/downloads2/test/10.0 with hdlist.cz ( replace "NICKNAME" and "PASSWORD" )NOTE 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 ! -------------------- |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 2nd September 2010 - 09:39 PM |