Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus batch bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming gpu hard drive hardware hdmi internet laptop malware memory modem monitor motherboard network printer problem ram registry router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
<-----------ur Contribution....tips Reserviour

Reply  
Thread Tools
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 04:02 PM #31
Q: How do I stop e2fsck from checking my disk every time I boot up.

A: When you rebuild the kernel, the filesystem is marked as 'dirty'
and so your disk will be checked with each boot. The fix is to run:

rdev -R /zImage 1

This fixes the kernel so that it is no longer convinced that the
filesystem is dirty.
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 04:04 PM #32
2.1. Moving directories between filesystems. Alan Cox,
A.Cox@swansea.ac.uk

Quick way to move an entire tree of files from one disk to another

(cd /source/directory; tar cf - . ) | (cd /dest/directory; tar xvfp -)
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 04:16 PM #33
Faxing from Windows to a Linux fax server
Mini-HOWTO: Sending faxes with Windows eFax, Linux and Samba.
Part 2: a Faxmail facility for your users.
A little mini HOWTO made by "pappavis".


OVERVIEW:
Right, so you have a linux box, you want to send faxes with your fax mode. And, you don't wannt to shell out for a commercial
fax program like WinFax or whatever. To the rescue comes eFax for your faxing needs.

The installation and configuration not for dummies, you gotta have some Linux experience to accomplish tasks. Things like RPMs and printcap should be familiar, if not then your about to learn it. Stay with me, this is a great FREE solution for even big sites.


INSTALLATION of the Fax
* Install eFax take the RPM's.
* set the /etc/printcap to use my faxlpr script which must be chowned to executable.
* Create a printer in Samba, naming it in Samba the same as the fax printer that was setup by eFax RPM /etc/printcap.
* Restart samba for the printer to be activated.
* Add a new postscript network printer to windows, use the Apple Laserwriter, set the networkprinter to \\yourserver\fax.
* Look at my printer script, u need perl as well. Set some things inside, its logical..
* Print something from windows

Please note: Your document need to have the words Fax:<space>number becos the linux machine uses a pattern matching thing!!!

Thats all for now, u can mail me if u have questions.
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 04:47 PM #34
Do share....
8inchFloppy's Avatar
Junior Member with 3 posts.
 
Join Date: Oct 2003
19-Oct-2003, 07:29 PM #35
healtheworld- Your tips are a valuable resource to me - a relative noob to Linux, getting to know the CLI is useful (being brought up on dos), but aren't most GUI utils aimed at eliminating the CLI and making the Linux experience, just that much more easy? (easier, that is, for converts from Windoze....)

Keep posting anyway, and I'll keep printing!
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 08:15 PM #36
second CD ROM to work
******************

Linux allocates devices like this:

hda: Primary Master HDD
hdb: Primary Slave HDD
hdc: Secondary Master
hdd: Secondary Slave

In your /etc/fstab, you will have a line looking like this:

/dev/cdrom /mnt/cdrom iso9660 ro,noauto 0 0

To add a second drive, just copy your current entry for your CD ROM and modify it, eg:

/dev/hdd /mnt/cdrom2 iso9660 ro,noauto 0 0

So now you fstab will look something like this:

/dev/cdrom /mnt/cdrom iso9660 ro,noauto 0 0
/dev/hdd /mnt/cdrom2 iso9660 ro,noauto 0 0

Done...your second CD drive will now work.
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 08:16 PM #37
How do I configure my Sound Card
****************************

With Red Hat Linux, you can run the utility

sndconfig

from the command line (not in x-windows) as root, and it will walk you through easily setting up a PCI or ISA sound card. This is the easiest way I've seen to set up your sound card. If this does not detect it, run

pnpdump

which will give you info about your pnp devices and allow you to set them up.
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 08:17 PM #38
How Do I Read My Windows Drive From Linux
***************************************
I want to read my windows Drive from within Linux?

I have written this HOW TO for Windows users new to Linux.
It is only meant to give a very basic insight as to the way
Linux handles hardware devices and filing systems.

For the sake of simplisaty, I am making some assumptions;
Namely you started with a “windows machine” with one hard drive fitted .

You freed up some space and created two new partitions
for linux to reside, using tools like fips & fdisk

NOTE: LINUX MOUNTS FILING SYSTEMS NOT DEVICES

BASIC Linux Hardware devices

fd =floppy drives

hd =harddrives

cdrom =CD-Rom

All Linux Device's are stored in a directory called /dev so more properly /dev/hd

We are only concerned with /dev/hd here.
Linux will allocate a letter for each physical hard drive attached to your system starting with a

so if you have only one hard drive on your system
it would be labeled /dev/hda

this is regardless of how many partitions their are on that hard drive

Partitions

As you know, when you installed Linux on to your system
you had to create two new partitions on your hard drive
for Linux to reside.

The ROOT partition and the SWAP partition.

So including the Windows partition, you now have three partitions on your hard drive.

Linux will allocate a number to each partition on /dev/hda

/dev/hda1 Windows FAT

/dev/hda2 Linux Root ect3

/dev/hda3 Linux Swap

So /dev/hda1 is the Windows filing system

on hard drive /dev/hda

It is this Filing system that can be MOUTED by Liunx

You can use the command line to mount /dev/hda1 if you wish.

But for me, that is way too much messing about every time
I want to get photo or document from my windows drive. So tell Linux to mount it at boot.

Log on to Linux as root.

Firstly you need a place for linux to mount the files stored on /dev/hda1

Open the directory /mnt and create a new directory there, and name it windows

So /mnt/windows will be the place to look for your windows files

Now, tell Linux to mount the filing system at boot. This is done by a configuration file
called /ect/fstab. Using a text editor open the file.

It looks something like this


LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 owner,kudzu, ro 0 0
/dev/fd0 /mnt/floppy auto owner,kudzu 0 0

Add the Line

/dev/hda1 /mnt/windows vfat


Now save the file.

The use of vfat here, simply identify s /dev/hda1 as FAT the windows filing System

All that remains to do is to set the
permissions for /dev/hda1.
This is done by adding the line

/dev/hda1 vfat rw 00

to the configuration file /etc/mtab

Okay you're done log out and reboot
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 08:17 PM #39
How can I access my Linux files while running Windows?
************************************************

I have often found myself needing a file stored on my /home partition, but running Windows on my dual-boot box. Rather than have to reboot, you can save yourself some time with the following 'gotta-have' utility.

explore2fs

Homepage (as of 8/5/2003):
http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm

Google for it:
http://www.google.com/search?q=explore2fs

Last ditch effort (subject to a 404 at any time):
http://www.flugh.com/files/explore2fs-1.00pre6.zip
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 08:19 PM #40
Setting up partitioning for installing Linux (just few method out of many)
************************************************

I am starting to notice a confusion in the forum of most Win98 users, I do not consider myself a Linux Guru so sugestions are welcomed, many are confused "Can I have linux with SomeOperatingSystem installed at the same time" 90% of the time the answer is yes, the exception is usally with NT4 when it messes with the bootloader. but everything else, Win9x, Win2k, etc they will do fine, first of before modifying any partition infomation.

Defragment your harddrives

I normally recomend Norton SpeedDisk, but Microsoft's defragger should be fine as long as it doesnt leave some clusters of programs at the bottom edge of the disk.

Backup your harddrive and important information

Typically I never had a problem with partitioning, but I have ran into a few newer people , who have no clue what they are doing, and might end up deleting their windows partition by acident

Grab a partitioning utility

heres where it gets a little tricky for a few, you could use Fdisk supplied by Microsoft(for purpose of deleting empty partitions, I dont recomend it to create your partitions, especially non-dos ones)

Fortunatly a lot of the linux distributions out there contain a /dosutils folder, that contains some files, one such tool is FIPS,

Utility Option 1 - FIPS & FDISK

after you are done defraging, you can use FIPS, to split your partion at whatever part you want, like cutting the drive in half, I dont know how safe this is compared to other tools, but it's set as one of the standard tools, once you have ran Fips, and told it how much to cut off, reboot, then go into FDISK, (first make sure that C: is your original partition, becuase if you have two drives, C: may be your original, D: may be the new empty, and E: may be your second drive, not C: D: Empty, so make sure you know which is which to avoid deleting the wrong one)

When in Fdisk you can press '4' to view the partition table (or '5' if you need to change which harddrive you made the split on then press '4' to view) you'll see the partition table, first half should be your original, and the second smaller(or larger depending on how much you cut off your partition) one should be the empty new one, delete this one (at main menu, press '3' , then the # of the type of partition typically a primary and follow the steps)

after this , reboot, there should be unallocated space
get to the instalation start after I've explained options

Option 2 - Using Partition Magic 4 or 5

If you are like me , you use Partition Magic, a very simple software, that lets you create, check, resize, resize cluster, move and etc to your partitions, in partition magic, just chose the partition you want to resize, and resize it down to the size you want, leaving the unallocated space, you can create a linux partition and what not, but I'd rather let the instalation program do that for me.

now onto the installing

depending on your distributions, the instalation processs may vary, so I'm going to speak from Redhat 6.2 and Mandrake 7.1 experince, you go along with the instlation as normal (if its off a CD, you can boot right off the CD if you want in either case, you can always run the /autoboot.bat un the /dosutils directory , on mandrake 7.1 if it's installing off a harddrive, you need to goto the mandrake directory it created on the root of the drive, and run harddisk.bat) once you are in the instalation follow the steps until it reaches the part about creating partitions, use the Linux FDISK option when you get here, once in, you can use 'p' to display the partition table list (I think you type 'h' to get help on some of the commands, if you need to change the fixed Disk) you should see your original windows partition, then unallocated space/

now type 'n' to create a new partition, it'll ask which primary partition to use, chose '2' (if you only have a single partition on the disk so far) type in the lowest number to start, ad the end of the last partition, then typw how big you want it +###M replacing the ### with the ammount of rams you have, then type 't' and chose parition #2, and type 82, this will have created your Swap partition, now repeat the step above from 'n' except dont use 't', and this time, instead of +###M , just type in the highest number (no '+' or 'M') in the () this will fill the rest of the unallocated space with a Linux native partition, now type 'w' to write the table infomation, and continue on your instalation as usual.

there that should be about it for the partitioning, of the drive, when you get to the part about the bootloader, you may have the option of letting it install a bootloader to your harddrive, or just let you use a bootdisk, the choice is upto you, have fun.
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 08:24 PM #41
How do I define a crontab entry?
***************************
Thought I would post this for future clarification, especially as there is an exception to the normal "AND" function when day of month and day of week are both specified.

All credit to the author Paul Vixie...

A crontab file contains instructions to the cron daemon of the general form: ``run this command at this time on this date''. Each user has their own crontab, and commands in any given crontab will be executed as the user who owns the crontab. Uucp and News will usually have their own crontabs, eliminating the need for explicitly running su(1) as part of a cron command.
Blank lines and leading spaces and tabs are ignored. Lines whose first non-space character is a pound-sign (#) are comments, and are ignored. Note that comments are not allowed on the same line as cron commands, since they will be taken to be part of the command. Similarly, comments are not allowed on the same line as environment variable settings.

An active line in a crontab will be either an environment setting or a cron command. An environment setting is of the form,

name = value

where the spaces around the equal-sign (=) are optional, and any subsequent non-leading spaces in value will be part of the value assigned to name. The value string may be placed in quotes (single or double, but matching) to preserve leading or trailing blanks.

Several environment variables are set up automatically by the cron daemon. SHELL is set to /bin/sh, and LOGNAME and HOME are set from the /etc/passwd line of the crontab's owner. HOME and SHELL may be overridden by settings in the crontab; LOGNAME may not.

(Another note: the LOGNAME variable is sometimes called USER on BSD systems... on these systems, USER will be set also.)

In addition to LOGNAME, HOME, and SHELL, cron will look at MAILTO if it has any reason to send mail as a result of running commands in ``this'' crontab. If MAILTO is defined (and non-empty), mail is sent to the user so named. If MAILTO is defined but empty (MAILTO=""), no mail will be sent. Otherwise mail is sent to the owner of the crontab. This option is useful if you decide on /bin/mail instead of /usr/lib/sendmail as your mailer when you install cron -- /bin/mail doesn't do aliasing, and UUCP usually doesn't read its mail.

The format of a cron command is very much the V7 standard, with a number of upward-compatible extensions. Each line has five time and date fields, followed by a user name if this is the system crontab file, followed by a command. Commands are executed by cron(8) when the minute, hour, and month of year fields match the current time, and when at least one of the two day fields (day of month, or day of week) match the current time (see ``Note'' below). cron(8) examines cron entries once every minute. The time and date fields are:

field allowed values


----- --------------
minute 0-59
hour 0-23
day of month 0-31
month 0-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)

A field may be an asterisk (*), which always stands for ``first-last''.

Ranges of numbers are allowed. Ranges are two numbers separated with a hyphen. The specified range is inclusive. For example, 8-11 for an ``hours'' entry specifies execution at hours 8, 9, 10 and 11.

Lists are allowed. A list is a set of numbers (or ranges) separated by commas. Examples: ``1,2,5,9'', ``0-4,8-12''.

Step values can be used in conjunction with ranges. Following a range with ``/<number>'' specifies skips of the number's value through the range. For example, ``0-23/2'' can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is ``0,2,4,6,8,10,12,14,16,18,20,22''). Steps are also permitted after an asterisk, so if you want to say ``every two hours'', just use ``*/2''.

Names can also be used for the ``month'' and ``day of week'' fields. Use the first three letters of the particular day or month (case doesn't matter). Ranges or lists of names are not allowed.

The ``sixth'' field (the rest of the line) specifies the command to be run. The entire command portion of the line, up to a newline or % character, will be executed by /bin/sh or by the shell specified in the SHELL variable of the cronfile. Percent-signs (%) in the command, unless escaped with backslash (\), will be changed into newline characters, and all data after the first % will be sent to the command as standard input.

Note: The day of a command's execution can be specified by two fields day of month, and day of week. If both fields are restricted (ie, aren't *), the command will be run when either field matches the current time. For example,
``30 4 1,15 * 5'' would cause a command to be run at 4:30 am on the 1st and 15th of each month, plus every Friday.

EXAMPLE CRON FILE
# use /bin/sh to run commands, no matter what /etc/passwd says
SHELL=/bin/sh
# mail any output to `paul', no matter whose crontab this is
MAILTO=paul
#
# run five minutes after midnight, every day
5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1
# run at 2:15pm on the first of every month -- output mailed to paul
15 14 1 * * $HOME/bin/monthly
# run at 10 pm on weekdays, annoy Joe
0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
5 4 * * sun echo "run at 5 after 4 every sunday"

EXTENSIONS
When specifying day of week, both day 0 and day 7 will be considered Sunday. BSD and ATT seem to disagree about this.
Lists and ranges are allowed to co-exist in the same field. "1-3,7-9" would be rejected by ATT or BSD cron -- they want to see "1-3" or "7,8,9" ONLY.

Ranges can include "steps", so "1-9/2" is the same as "1,3,5,7,9".

Names of months or days of the week can be specified by name.

Environment variables can be set in the crontab. In BSD or ATT, the environment handed to child processes is basically the one from /etc/rc.

Command output is mailed to the crontab owner (BSD can't do this), can be mailed to a person other than the crontab owner (SysV can't do this), or the feature can be turned off and no mail will be sent at all (SysV can't do this either).
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 08:25 PM #42
Backup from Linux to Windows using SMBmount
*****************************************
Here is the modified file for taking backup from linux to windows using smbmount.

1. Replace NTUsername with network id and NTPassword with network password.
2. Make the folder shared where you want to take the backup. You should give the full access to that network login ID.
3. The owner of this script should be root.
4. Be sure that, smbd and nmbd are running. If not, start them.
5. If normal user wants to run this script, then be sure that the setUID bit is set for /usr/bin/smbmnt.
6. Add proper values for DIRTOARCHIVE, MNTPOINT, and ARCHIVETO.
7. Modify the smbmount command parameters as per your requirement.

######################################################################

#!/bin/sh
#

# Script to backup the /home volume

ADMINID="NTUsername"
ADMINPASSWD="NTPassword"
DAY=`date +%Y%m%d-%H%M`
BACKFILE=<ProjectName>.source.$DAY.tgz
LOGFILE=/tmp/$DAY.backup.log
STARTTIME=`date`
DIRTOARCHIVE=<Directory path to archieve >
MNTPOINT=<Some directory having all permission >/forBackup$DAY
ARCHIVETO=$MNTPOINT/Source/Archive

# First umount and then mount.
###############################
umount $MNTPOINT
mkdir $MNTPOINT

smbmount <//Windows NT server/Folder for backup> $MNTPOINT -o username "$ADMINID/<workgroup>%$ADMINPASSWD"


# Generate the backup file
###############################
cd $ARCHIVETO

if [ `pwd` != "$ARCHIVETO" ]
then
echo "Aborting backup"
umount $MNTPOINT
rmdir $MNTPOINT
exit 2
fi

{
echo "\n\n"
date
echo "Archiving $DIRTOARCHIVE\n"
echo "The backup file is $BACKFILE\n"
echo "Logfile is $LOGFILE

"
tar -cvzf $BACKFILE $DIRTOARCHIVE

echo "End of tar process...."

} >| $LOGFILE


# Unmount
###############################
cd /
umount $MNTPOINT
rmdir $MNTPOINT
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 08:26 PM #43
RedHat Dual Boot with window
***************************

First install the OS first ( I assume window )

Then install RedHat – you may choose custom installation, you will come to a option on whether to install with linear….( might needed for some of the SCSI drive ). – Do not choose for the Linear option.

I think this should work.

If you still have problem for dual boot. Then Boot the RedHat with the diskett and amend the /etc/lilo.conf
- look for the line “linear” mark it off and replace it with lba32.
- it should have a line "default=Linux" ; you can change it to dos as well

- Then install the file by /sbin/lilo –v

You should have a dual boot systems now. This took me easily a month to find out. This is Linux – enjoy!
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 08:26 PM #44
What's all this partitioning stuff?
************************

Reading a recent post to a Red Hat newsgroup, it occurred to me that partitioning isn't necessarily the most straight-forward thing to do on a sunny Saturday afternoon.

You've looking at your Windows box, looking at these distribution CD's for Linux, thinking "This is a lot better than washing the car..."

I'm most familiar with Red Hat, so I'll refer to that installation process.

You put in the CD and reboot. CD doesn't boot? Check your BIOS; you might have to change the order it checks for boot devices.

CD boots? Great. Red Hat must be about as friendly as they come since *I* didn't have any major trouble with it...At least not after I sorted out partitions. First time around though, when I got to the partitioning section, I started to get nervous. Lose all data on the disk? No thanks! Keep in mind that that could always be a risk, even using friendly partitioning software that can shrink a partition for you.

So I'll describe what one might call "an ultra-safe repartitioning with the goal of a box you can dual-boot Windows/Linux."

My 6GB hard drive was nearly full and badly fragmented, so my first order of business was cleaning up and defragmenting the disk.

With this done, I performed a complete backup of the Windows side to 4 or 5 CDs, including recovery floppies to allow me to boot and restore from the backup. I also made a note of how much space the backup used so I could create a partition large enough for it later.

With everything safe (I went so far as to verify the backup set, of course), I was ready to boot to the Linux CD again.

Still a bit nervous as I get to the point of partitioning, but I can handle it.

I opted to use fdisk. Disk Druid, the GUI alternative, should be even easier than fdisk, so feel free.

I'll have to doublecheck some fdisk commands, but it's rather simple. My entire 6GB was one partition, so first thing was to delete that partition.

h Probably gives help
p Prints the current partitions
d Deletes a partition

Now then, have to make some partitions. First I made a FAT32 partition for Windows.

[Info on primary/extended & mount points to come]

c ?Creates a new partition

Then at least one ext2 partition for / (Linux)

Then a swap partition for Linux

Nice to have some documentation here so you can refer to various recommendations of putting /usr on one partition, /var on another and all that jazz. One partition was enough for me as I'm just learning, not administering an important system.

You can experiment here. One really nice thing about fdisk is that no changes are saved to the disk until you say so. I created and deleted partitions many times due to changing my mind about sizes.

At last I was ready to go...

w Writes the changes. Wave goodbye to what was there before.

Then you can proceed with the Linux installation...

And when you're good and ready, use your backup to put Windows back on a partition by itself.

Notes:

Free space on a drive is NOT unpartitioned space. If you've got 10gigs free on C:, that 10 gigs is part of that C: partition. If you go into fdisk thinking you can just designate that 10gigs as a new partition, you're...well, wrong.

There are ways to install Linux ON a Windows partition, but I don't see why you'd want to. Seek ye the docs and ye shall find.

If you're referring to this FAQ and something goes wrong with your backup/restore, I'm very sorry. You didn't need Windows anyway.
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
19-Oct-2003, 08:29 PM #45
How do I recover a lost/forgotten Root password
****************************************

Here are the instructions into breaking into your own system if you've lost your root-password. This is taken from an article I found in Linux Gazette, written by Mark Nielsen (http://www.linuxgazette.com/issue41/nielsen1.html).

This document assumes you are partitioned thusly:
/dev/hda1 swap
/dev/hda2 /
/dev/hda3 Dos

Author refers to Redhat 5.2 but this will work with subsequent versions (I've tested it).

Steps:

1. Make system bootable from CD-rom (either in BIOS or use a boot floppy that will do so).

2. Put Linux Distribution CD into cd-rom drive and turn on computer.

3. Pretend to go through installation of distribution and after it asks you to put in the CD-rom and it gets to the next screen you can now go to the second console window.

4. Press Alt-F2, Alt-F3, Alt-F4, Alt-F5 and then Alt-F1. You should see the various screens with different messages. The one we want is Alt-F2.

5. Press Alt-F2.

6. Type "cd /tmp" and press enter. This takes us to a directory where we can make files, directories, etc...

7. Now we will make a temporary directory and a temporary device for the partition on the hard drive that we want to look at or edit. Type the following:
mkdir /tmp/my_dir
mknod /tmp/my_dev b 3 2 #the two is taken from hda"2"
above, so should be wherever your "root" partition is.
mount /tmp/my_dev /tmp/my_dir
df

8. "mkdir" makes a directory for us to mount the a partition to. "mknod" makes a device for 2nd partition on the master hard drive (hda2). This lets us "see the partition. In particular, "b 3 2" means "b" is for block device, "3" is the master hard drive on the primary IDE controller and "2" means the second partition.
"mount" takes the device we can "see" and puts it on top of the directory /tmp/my_dir.
"df" lets you see what filesystems are mounted and where.

Now we can iether edit the password file or perhaps something like turning off xwindows from starting up if you have a computer using xdm. Let's do the password

9. type: "cd /tmp/my_dir/etc" then "vi passwd"

10. You need to know how to use vi (a great editor found on almost every UNIX by default). "x" deletes a character, "i" inserts characters, "Esc" turns on and off command mode/insert mode, "wq!" writes, quits and ignores any problems with
read-only files, "h" moves one character to the left, "l" one character right, "k" up one line, "j" down one line.

11. Now in the passwd file press "j" until you get to the line you want to be on "root" (for our example)
root:x:0:0:root:/root:/bin/bash # here we want to delete the "x" which is telling
us the password is shadowed.
Now type "wq!" (without the quotes)

12. Now type "vi shadow"

You may see a line for root that looks like this
root:$1$Upkf7iIA$.nSNmn0MkoRP2srJsUx.0/:11321:0:999999:7:::
just delete everything between the colons to make it look like
root:::::::: # that's 8 (eight) colons after the word "root"

Now type "[Esc], :, wq!, enter" to write the file, quit and ignore read-only problems.

13. Now you're done editing the file, what is the problem now? If you reboot you will likely lose all of your changes. You must unmount the directory, THEN reboot.

14. Do this > "cd /tmp" > "umount /tmp/my_dir" > "df"

15. After ensuring you unmounted ok, press CTRL-Alt-Del to reboot. Also, take the cdrom out fo the cdrom drive. When your computer restarts I'd recommend having your BIOS boot off the hard drive rather than the CD-rom.

That's it, this is very useful in the case of lost/forgotten root passwords. But it's also good for fixing other problems when you just can't get it booting the right way. As I said, I plagarised the hell out of his article. But it was a great article and helped me out immensly. I hope Mr. Nielsen doesn't mind my copying his work for this forum.

d3funct
borg@pcgeek.net
The software required `Windows 95 or better', so I installed Linux.
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:30 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.