Scot’s Newsletter Forums

Welcome Guest ( Log In | Register )

15 Pages V  « < 3 4 5 6 7 > »   
Closed TopicStart new topic
> Tips for Linux Explorers, Helpful info for those learning Linux
Bruno
post May 13 2003, 07:08 PM
Post #100


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611





REDIRECTIONS ( AND THE BLACK HOLE: >/dev/null )

Right, it's about time to put something right: uptill now I did use the "<" and ">" characters to make clear to you what part of the text the real commands were. For "The Linux Starters" that seemed like a good idea.

Now we come to the point where I do need those signs to have a function in the commands I will tell you about.
But let's be fair, if you made it up till here, you can't be considered as a "Starter" anymore. And you will know a command when you see one !! wink.gif

We use the "> <" signs for redirections, example:

CODE
$ ls /music/dylan/*.mp3 1>songs.txt


Will make a list ( ls ) of all the files in the dylan directory ( /music/dylan ) ending with .mp3 ( *.mp3 ) . This list usualy sent to standard out ( 1 ) but now redirected ( > ) to the file songs.txt ( songs.txt ) in your /home.
NOTE: the 1 for standard out is in this example not really needed, but we might as well get used to it !
0=Standard in ( usually the keyboard ) 1=Standard out ( the normal output on your screen ) 2=Standard error ( the error messages you get on the screen )


Still with me ? Next example:

CODE
$ wc -l 0<songs.txt


Will count the lines ( wc-l ) from the input ( 0< ) of the file songs.txt
Simply said: it will tel you how many Bob Dylan .mp3's there are in my dylan directory !
Well, that is a nifty trick isn't it ?


O.K. Because you're starting to like this, one last example:

CODE
$ ls -R /var >/dev/null 2>errors.txt


This is a funny one, let me first explain what we end up with, before cutting it in pieces: we will get a list of all the files we have no permission for, in the /var directory ( the error messages we usually see on the screen as we try to access a file we have no permissions for ).
List all the files in all directories ( ls -R ) in the /var directory ( /var ) and send them ( > ) to the black hole ( /dev/null ) and send all the error messages ( 2> ) to a file called errors.txt ( errors.txt )


That's it for today friends, glad I managed to get it noted down ! smile.gif
( *wipes the sweat of his forehead )


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
mrselfdestruct
post May 14 2003, 12:09 AM
Post #101


New Kid
*

Group: Members
Posts: 5
Joined: 13-May 03
From: San Diego
Member No.: 1,148



Hi Everyone,

(If you want to read my tip skip the first paragraph)

Bruno, I really appreciate the information you have posted! Linux and I have an off and on again relationship but with people like you helping out I hope to build a lasting and working knowledge of Linux. A friend recommended Scot's newsletter and it has been a vast resource of knowledge of Windows and now Linux too. Thanx Scot!

Here is my tip:

If you have ever wondered about the status of your network connection ie. if Full-Duplex is in effect. I ran across a simple program that shows you statistics about your interface.

If you go to Linux Ethercard Status, Diagnostic and Setup Utilities website, you can download the mii-diag.c source code. Once you download the source, go to the directory that you downloaded it to and type <gcc mii-diag>, assuming that you have gcc installed. If not, the Mandrake Control Center --> Software Management --> Search for gcc will install it. Assuming again, that you have a rpm source setup correctly. Once you compile the source code, a binary will be created. When you run the program with <./mii-diag> you will get the promised statistics. Note: There are compile switches that can change the way mii-daig works. More information can be found in the documentation on the website or in the source code itself.

Have Fun!
Go to the top of the page
 
+Quote Post
Bruno
post May 14 2003, 05:54 AM
Post #102


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



Welcome to the forum mrselfdestruct and thank you for those kind words.
The fact that you, next to these praises are including a tip in your very first post is a very good start !
I really hope we can restore your "off and on" relationship with Linux.
Looking forwards to your admissions. If at any time you think we're overlooking one of your posts ( weird things do happen sometimes ) feel free to send us a PM.

cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 14 2003, 05:37 PM
Post #103


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



MD5SUM of an ALREADY BURNED CD ( Also see: Check CD Script )

A few posts back I told you to do the md5sum on the ISO files themselves, just because that is far off the easy way ! wink.gif
However CD's can be checked too, it only takes a little more.
First check if you have "isoinfo" installed on your Linux box.
Type in a console:

CODE
$ whereis isoinfo


If it's not installed, look for it on your install-CD's !

Here is how it is done ( my example here is a Slackware 9.0 CD )
Put the CD in your CD-rom player, and type in a console:

CODE
$ isoinfo -d -i /dev/cdrom


This will give you something like this:

QUOTE
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: Slack9d1
Volume set id:
Publisher id: Slackware Linux, Inc. <info@slackware.com>
Data preparer id: Slackware Linux, Inc. <info@slackware.com>
Application id: Slackware Linux 9.0 disc 1
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 339344
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found


The only important info of this output are these two lines:

Logical block size is: 2048
Volume size is: 339344

Now, leave the CD in the player and type:

CODE
$ dd if=/dev/cdrom bs=2048 count=339344 conv=notrunc,noerror | md5sum


BEWARE: change the numbers with the ones you found in the previous output !!
This will produce a new output ( takes several minutes ! )

QUOTE
339344+0 records in
339344+0 records out
563c1bfff307a16d45f5da04011f07b6 <===( This is the checksum number ! )


Now go to the mirror you have downloaded your ISO from ( or any other mirror ) and pick up the text-file md5sum. This textfile contains the original number:

QUOTE
563c1bfff307a16d45f5da04011f07b6 slackware-9.0-install.iso


If this number matches the number you found in the output above, you can be sure your CD is integer !
In this case it was, but then I always check the numbers before burning my CD, 'cause that's so much easier and does not turn any blank CD's into coasters ! biggrin.gif biggrin.gif


UPDATE: Recently added to the tips: Check CD Script


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Borst
post May 15 2003, 01:29 PM
Post #104


Message Adept
***

Group: Members
Posts: 35
Joined: 14-May 03
From: Western NY
Member No.: 1,167



WOW! This is quite a book of knowledge Bruno. cool.gif Although I have only breifly read this post, I have already learned much. I had several Linux questions but I see several are answer. Keep up the good work!

Borst


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 15 2003, 01:35 PM
Post #105


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



Thank you Borst, and welcome to the forum.
Hope you will find a "home" here !


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 15 2003, 03:22 PM
Post #106


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



CONFIG COMMANDS in REDHAT ( and FEDORA )


If you want to shutdown the services via the console (xterm) or terminal, then login as root....Type in 'ntsysv' You will then get a list of the services. Press F1 for more info. To disable use the space-bar. And finally OK. Reboot and note the changes.....

Via GUI, RedHat has a tool too; ''redhat-config-services"

Btw, the other system-admin tools for RedHat are:

redhat-config-date
redhat-config-httpd
redhat-config-keyboard
redhat-config-kickstart
redhat-config-language
redhat-config-mouse
redhat-config-network
redhat-config-network-cmd
redhat-config-network-druid
redhat-config-network-gui
redhat-config-network-tui
redhat-config-nfs
redhat-config-packages
redhat-config-printer
redhat-config-rootpassword
redhat-config-samba
redhat-config-securitylevel
redhat-config-services
redhat-config-soundcard
redhat-config-services
redhat-config-time
redhat-config-users
redhat-config-xfree86
redhat-control-network
redhat-install-packages
redhat-logviewer
redhat-update-gnome-font-install
redhat-update-gnome-font-install2


Many thanks to our special agent !

cool.gif Bruno


PS: Fedora has most of that commands too . . but they start with "system-config-", here they are:

system-config-date
system-config-display
system-config-keyboard
system-config-language
system-config-lvm
system-config-network
system-config-network-cmd
system-config-printer
system-config-rootpassword
system-config-samba
system-config-securitylevel
system-config-services
system-config-soundcard
system-config-time
system-config-users
system-control-network
system-install-packages **
** need to give name of package to install


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 15 2003, 03:37 PM
Post #107


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



EXTRA MOUSE BUTTONS
A lot of you people have a mouse with all those fancy extra buttons: three, four or even seven buttons are common place these days. Makes me wonder where we will end up . . maybe some day the keyboard will be integrated in your mouse biggrin.gif !
Anyway, let's get those buttons work for us:

First you need to set up your mouse in XFree86 (When using Xorg the file is /etc/X11/xorg.conf )

CODE
$ cat /etc/X11/XF86Config-4
( to check if the file is in the right place, if so: )

CODE
$ su
< password >
# vi /etc/X11/XF86Config-4
(open the file in vi )
< i > ( put vi in insert mode )
look for the "input device" mouse section and adapt it to look like: ( line 3, 5 and 6 !! )

QUOTE
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/psaux"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"


Save and close vi :
Esc
ZZ


After that you need to give the command:
CODE
# xmodmap -e "pointer =1236745"


Then make a script in .kde/Autostart :
CODE
$ vi /home/bruno/.kde/Autostart/mouse
(makes the file "mouse" )
< i > ( put vi in insert mode )

and put the following lines in there:

QUOTE
#!/bin/sh
xmodmap -e "pointer = 1 2 3 6 7 4 5"


Save and close vi
Esc
ZZ


Once your wheel works you can test to see the extra buttons with < xev > (place mouse in the square and click the buttons and see what happens).

Then you need to download the program "imwheel" (1.0.0pre1) you can find it Here and install it.
It is a .tar.gz file ( tarball ) see for instructions page 3 of the Tips for Starters smile.gif !

And make a file .imwheelrc in your /home directory:
CODE
$ vi /home/bruno/.imwheelrc
(creates the file )
< i > (puts vi in insert mode )

and add the lines:
QUOTE
".*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right

Save and close vi
Esc
ZZ

And make a script to start the imwheel program:


CODE
$ vi /home/bruno/.kde/Autostart/imwheel
( makes the file in Autostart )
< i > ( puts vi in insert mode )

With the following lines:

QUOTE
#!/bin/sh
imwheel -k -b "67"


Save and close vi
Esc
ZZ

And that is all my friends, now you can simply restart KDE ( or give the command: imwheel -k -b "67" ) and have fun ! biggrin.gif biggrin.gif


cool.gif Bruno


PS: Thanks to Ryan for testing and providing the link !

NOTE: PCLos 9.2 seems to need special treatment, you can read about the solution here: http://forums.scotsnewsletter.com/index.ph...st&p=181607


--------------------
Go to the top of the page
 
+Quote Post
LilBambi
post May 15 2003, 05:27 PM
Post #108


Australisches Googler
Group Icon

Group: Forum Admins
Posts: 11,047
Joined: 19-March 03
From: Virginia
Member No.: 100



Hey, Bruno!

Wonderful! More great tips all the time! cool.gif


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 16 2003, 05:13 AM
Post #109


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



Thanks Fran !

There is more coming ! wink.gif


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 16 2003, 06:46 PM
Post #110


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



CRON-JOBS and the CRON DAEMON

Cron-jobs are maintenance jobs performed automaticly on your system every night, once a week or a month. Jobs like "logrotate" ( refreshing log files and zipping up old ones ) updatebd ( updating your "locate-search" database ) and a lot of other databases like the rpm database.
Cron comes from the Greek word chronos ( Time ) wink.gif

The program that takes care of this is the Cron-daemon. At a pre-selected time it starts doing the jobs that are to be done. Mostly between 3 and 5 at night because then it does not interrupt the users working hours. (if your computer is off at those times you'll have to install "anacron" that picks up forgotten jobs the next time the computer boots ).

There are cron-jobs system wide, general rules that you should not be messing with. But you can add a series of user specific rules.

The schedule for cron is written in the /etc/crontab file.
Lets have a look at the system corntab:

CODE
$ cat /etc/crontab


Will show:

QUOTE
# run-parts
01 * * * * root nice -n 19 run-parts /etc/cron.hourly
02 4 * * * root nice -n 19 run-parts /etc/cron.daily
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly


The order of codes here is: minute, hour, day-of-month, month, day-of-week, user and command. The * means any value will do. So the first line tells it every ) 01 minutes, of 1 hour, of every day, of every week and every month "run-parts /etc/cron/hourly" The second line tells it to do the daily jobs at 4.02 hrs. The third line to do on day 0 the weekly job at 4.22. The last line to do every 1st of the month the monthly job at 4.42 !
If those times are very inconvenient you could change them to your preferences.

O.K so what is in /etc/cron.daily ?

CODE
$ cd /etc/cron.daily
$ ls


This will show you this:

0anacron - logrotate - makewhatis.cron - msec - rpm - tmpwatch

Those are all little scripts for the tasks to be done.
Just add your script ( backup ? ) and it will run with the other daily tasks. Shell or bash script it does not really matter.

Example: Have a look at the rpm script now that we are in the right directory:

CODE
$ cat rpm

will show you:

CODE
#!/bin/sh
rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 | sort > /var/log/rpmpkgs


See ? . . . . . . #!/bin/sh on the 1st line and a "simple" command on the 2nd line !

Do explore a little and see what all the hourly to monthly tasks are about.

I only did explain all this to you so you would better understand how things are done by the software you are running ! biggrin.gif


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 17 2003, 04:58 PM
Post #111


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



UPDATING your URPMI-SOURCES

A few pages ago ( page2 ) I told you about adding your urpmi-sources.
From time to time you have to update your urpmi-sources because packages on those mirrors will change and you will no longer be able to use this clever install utility.
Updating is as easy as 1 2 3 :
As root in a console ( while you're on line ) :

CODE
# urpmi.update -a


That's all ! But then, it's Saturday night, so I would want to put your head through too much stress ! biggrin.gif biggrin.gif


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 17 2003, 07:21 PM
Post #112


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



COMMANDLINE MP3 PLAYER

Sunday is a day to chill-out and listen to a sheer endless stream of music.
Here is a neat little trick for you commandline-lovers that really pays off wink.gif !
To play ALL mp3's on your computer in random order:

CODE
$ mpg123 -Z --list <(locate "*.mp3")


Note: the special characters: -- < " * . " they all have to be there !
To stop playing: Ctrl+c ( 2x )

Sure you can play just one song too:
CODE
$ mpg123 /home/bruno/music/dylan/To_Ramona.mp3


For more options see "man mpg"

So now you can listen to some music while tweaking your computer ! biggrin.gif
Have a nice sunday !


cool.gif Bruno


PS: A commandline mp3 player uses no GUI thus is extremely easy on systemresources ! wink.gif


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 18 2003, 09:02 AM
Post #113


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



BASIC RULES FOR INSTALL

I know it's a bit late to come with basic install tips, but it looks like a good thing to give a few guidelines:

If you want to check first if your hardware is supported try a Live CD


1) Don't forget to do a good backup of important data on your computer even if it is on a partition that won't be effected by the install !

2) Make a plan in advance on how you want your partitions done ( see Here ) and what filesystem you want to use ( Ext3, ReiserFS etc. See Here and Here )

3) Do not uses all your free space of the windows partition, you might want to leave some working-space there for adding new programs or temp files ( CD burning programs need at least 700 MB temp ) we don't want to cripple your windows OS. smile.gif

4) BIOS: Put the entry: PnP aware OS on NO ! ( See Here )

5) BIOS: First boot device: CD-ROM, second Floppy, third IDE-0

6) Connect all printers, scanners, card readers etc. and make sure they are turned on

7) Check out the README and INSTALL text files on your CD

8) Note down the root-password you make during install. ( once you have used it a couple of times you can burn the evidence wink.gif )

9) Install the bootloader Lilo or Grub in the MBR ( it will include your windows options automatically ).




Pin this on the wall, and read it again every time you make a new install ! biggrin.gif


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 19 2003, 03:52 PM
Post #114


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



BASIC MACHINE INFORMATION

There are a few commands you can use to get the kernel version , machine number and a couple of other basic info of your computer:

CODE
$ cat /proc/version
Will give you a full string of information.

CODE
$ uname -m
Will give you the machine number ( like i686 )

CODE
$ uname -r
Will show the kernel version

CODE
$ uname -n
The localdomain name

CODE
$ uname -s
The system name

CODE
$ uname -p
The processor

CODE
$ uname -a
All info above in one + date and time


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 19 2003, 04:29 PM
Post #115


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



WHAT IS IN THAT PACKAGE ?

Here is a short one:
We can see what is in a package ( rpm or tar.gz or tgz ) , with the following command:

CODE
$ less /home/bruno/downloads/package.rpm

( replace "package.rpm" with the name of the file )

We will do more tricks with the command "less" another time !


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
charlie
post May 19 2003, 05:36 PM
Post #116


Message Mogul
*****

Group: Members
Posts: 428
Joined: 4-April 03
From: Halifax NS
Member No.: 641



Bruno's tips....a little feed back. The HD partitioning ... both my desk top and laptop have a modifed , size wise of the 10 Gb drive , updated and it is working great. last week a Linux friend and I installed Mandrake 9.1 using the 15 Gb + configeration , but as there was no "+" and the /backup was left out. The install picked up both printers, an Epson and a Brothers and the high speed cable connection.

One thing the /backup brought forth was the question , where is the Mozilla files (Mail) The mail files and the Mozilla dir are in a hidden file ./Mozilla/.../.../ which can be viewed by making them visiable in the file manager, copy to a safe place on another Hd and restore after installation.

The PLF , urmpi information, required a little more thought. My PPPoe needs to be active to make these commands work so I just downloaded a large file to make sure I was connected all three operations worked fine , the plf.asc , urpmi update and urmpi update page

Now to arrange all the information in a binder so I can find it .... and last but not least get Xine to work reading DVD's Been a long haul with this program . still not able to run DVD's

charlie from down east Canada biggrin.gif
Go to the top of the page
 
+Quote Post
Bruno
post May 19 2003, 05:48 PM
Post #117


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



Thanks for your feedback Charlie ! And the additional information.
Always good to hear that people have good use with the Tips, and there is more of them comming up.So get yourself a large binder ! biggrin.gif


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 20 2003, 04:12 PM
Post #118


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



GETTING IN TEXT MODE and SHUTTING DOWN X

There was a question in a thread about installing Nvidia drivers about how do I leave X and get the computer in text mode.


There are 2 ways to do that:

EITHER:

Ctrl+Alt+F1 (or F2 to F6 ) Will get you out of X
Alt+F7 will get you back in X

OR:

CODE
$ root
< password >
# init 3 ( will get you in runlevel 3 )
# init 5 ( will get you back in runlevel 5 )


Alt+F7 will get you back in X

Read also the Tip about "Runlevels"


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 20 2003, 05:45 PM
Post #119


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



LOST USER PASSWORD

Now, just imagine, you have a sudden strike of growing old, and, you forgot your user password. I know it's hard to figure, but weirder things happen !

The solution however is simple:

CODE
$ su
< root-password >
# passwd bruno
( if that is your username, don't use mine )

Type in a new password ( you will likely get an error message, ignore it )
Type in the same password again !

Log out as root and log in as user with your new password !
( I said is was easy ! wink.gif )

Next time we will attack the forgotten ROOT password ! A bit more complicated but it sure can be done.


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 21 2003, 03:24 PM
Post #120


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



LOST ROOT PASSWORD

Here is part two. Yesterday we had forgotten our user password and disaster strikes again today we forgot the root password.

First, disconnect your PC from the net, pull the cable out !

Step 1: For Redhat and Mandrake:

Then boot from your first install CD and as the very first screen comes up hit F2 and type:

rescue ( For RedHat "linux rescue" )

and the computer will boot in rescue mode.

It will show a few alternatives, select : "mount the existing partitions" and go to the shell/console prompt.

( Booting Mandrake in "failsafe" from the Lilo menu does the same )


Step 1: For SUSE:

Boot from your first install CD and press F1 at the first screen, then choose "Rescue System" from the menu and at the prompt type "root" ( you do not need a password )


Step 1: For other distro's

Boot from the first install CD ( or any Live CD like Knoppix ) and at the bootprompt type:
CODE
linux single
( For Knoppix: knoppix single )
And it will boot in "single user mode" and you will get an odd looking prompt like "sh-2.05b#"

Alternative for step 1
Sure with most Live and Rescue CDs you can also just boot in the live version, mount the partition and, as root, make changes to the files indicated below wink.gif:


Step 2

CODE
# cd /etc
( if you boot from knoppix first cd to the partition your lost-password-distro is on )

We need to change two files; "passwd" and "shadow":

CODE
# vi passwd
( opens the file )
< i > ( puts vi in insertmode )

This is the first line:
root:x:0:0:root:/root:/bin/bash

Make it:
root::0:0:root:/root:/bin/bash

So just get writ of the "x" do not touch the ":" ( colons )

Save the file:
Esc
ZZ

Second file to be changed:

CODE
# vi shadow
( open the file )
< i > ( insert mode )

The first line is a long scrambled line of characters, just make it:
root:::: ( four colons ! )

Save the file
Esc
ZZ

Now you can reboot your computer. Log in as normal user, open a console and type:

CODE
$ su
# passwd


And set the new root password !

Log out as root:
Ctrl+d

And the job is done biggrin.gif biggrin.gif

WARNING: Only after setting your new root password it is safe to connect your computer to the internet or local network again !!


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 21 2003, 03:59 PM
Post #121


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



INSTALLING FIREFOX IN LINUX
Step by step instruction

Because installing Firefox is different from all other install-routines I made a step by step instruction for it. wink.gif

Download the file to your "/home/bruno" directory

You can get the lastest file Here
( Get the one that has Linux and does NOT have "installer" in the name wink.gif )

After downloading it go to your home directory, open a terminal/console and type
CODE
$ su
< password >
# mv firefox* /usr/local/bin/
# cd /usr/local/bin/
# tar -zxvf firefox*


log out root:
Ctrl+d

Type "kmenuedit" and you'll get a GUI where you can add an entry in --> Internet --> Web Browsers.
( NOTE: kmenuedit is for KDE based distros . . for distros that use the Gnome desktop use either "alacarte" or the "gnome-menu-editor" )

Call it Firefox and fill in as command: /usr/local/bin/firefox/firefox

Save
Close Menudrake
Close the console

and have a look in your "menu" it should be there ! ( you can drag a shortcut from the menu on your desktop or "taskbar" )

If everything works okay you can delete the .tar.gz package from /usr/local/bin:

CODE
# rm /usr/local/bin/*.tar.gz



Happy browsing ! biggrin.gif


cool.gif Bruno

PS: See comments ( and extra tips ) on these instructions Here

This post has been edited by Bruno: Jul 29 2008, 04:55 PM


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 21 2003, 07:09 PM
Post #122


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



THE TRICKS IN KDE "HOME"
( most of these only in Mandrake)

As you klick on the Home icon on your desktop konqueror will open and show you the contents of /home. Right clicking on an empty space and selecting "new" will give you a context menu with several choices, at the bottom you will see the most interesting ones: "Link to application" and "Link to harddisk".

Lets start with the last one, imagine you want to access your windows partition very often, a direct link to your "C" drive might come in handy.
Rightclick, select "new" and choose "harddisk" , a window will pop up, on the first tab you fill in "Win C" and on the last tab you look for the partition of your C-drive. Click O.K. And youre done !

Now the "link to application", Lets suppose that you want to be able to start your favorite game while browsing your /home directory you can do the same as above but you have to know the "path" to the application.

Rightclick on an ISO file and you can directly choose to burn it to CD

Rightclick on a zipped file and you can unzip it.

Rightclick a directory or file to zip it.

Drag a file, link or directory on the "Desktop icon" and it will put a link on your desktop.

Point with your mouse to a sound file ( wav, mp3, ogg ) and you'll hear music. ( if preview is enabled, see below )

Next to all this fun you can choose preview in the 'view" menu to have thumbnails from all your pictures, text documents, html files etc.

Put a music CD in your drive, click on the yellow star in the side bar and you can rip the CD to ogg files in seconds.
Access the KDE ftp sites by clicking on the globe in the same sidebar.

And sure you can use konqueror to browse the net too. wink.gif

There is much much more to tell about konqueror. Send me tips in a PM and I'll edit them in the text.


cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 22 2003, 04:06 PM
Post #123


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



BACKUP your WINDOWS in LINUX

If you have enough space on your linux partition you can make a full backup of your Windows ! ( no Ghost-image needed )
And easy to restore if you ever need to. wink.gif ( would not be the first time would it ? )

Here is what we do, first we have a look if we have enough space:

CODE
$ df -h | grep /win


Look at the second number, the first is the total space, the second the used space the third is the available space on your C drive.

Then do a:

CODE
$ df -h


To see where there is enough space in your /home or /backup partition.


Now the fun starts :

CODE
$ cp -p /mnt/win_c /home/bruno/backup/
( or where ever you want to save the backup )

That's it ! Easy as pie. Backup is made, you're safe from fatal injuries.


To restore: Delete all the files on your C partition ( do this in Linux ) and:

CODE
$ cp -p /home/backup/win_c /mnt/


and tell it to overwrite the existing win_c if it asks you !


You can also restore just one file ( registry wink.gif ) or just all the \system files.

NOTE: The -p argument preserves the time and date stamps of the files.


To save space you could also compress the files, time and date will stay in tact without any added argument:
QUOTE (Peachy @ Forum)
Another alternative is to use tar to create a compressed image of your Windows partition:

$ tar -cvzf win_backup.tar.gz /mnt/win_c

This command will do it because the -z parameter will automatically use gzip to do the compression.

To restore simply do "tar -xvzf win_backup.tar.gz" wink.gif



cool.gif Bruno


--------------------
Go to the top of the page
 
+Quote Post
Bruno
post May 23 2003, 04:05 PM
Post #124


Le Professeur Pingouin
**************

Group: Admin Emeritus
Posts: 37,904
Joined: 4-April 03
From: Amsterdam
Member No.: 611



DMESG: DEBUG MESSAGES

Now after 59 tips, for once we will go into something more complicated, I'll keep it short because there are other people who can explain this far better to you.

The command:

CODE
$ dmesg >message.txt


This will make a text file in your home directory, a long file of messages where in case of troubles with your computer you could look for information.
A good site to help you understand those debug messages is:

http://linuxgazette.net/issue59/nazario.html

My advice: execute the command and give the text file a glance, just so you know what "dmesg" can do for you. As long as your computer runs O.K. don't bother with the fineprint, but in case of serious problems go in there head first !


cool.gif Bruno

PS: there is more interesting things to read on that site. wink.gif


--------------------
Go to the top of the page
 
+Quote Post

15 Pages V  « < 3 4 5 6 7 > » 
Closed TopicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd September 2010 - 09:33 PM