Best of Technical Support

by Various
Who Goes There?

I have taken over a Linux system for a company. The company uses the box as an Internet server. The problem is that the person I have taken over for left without providing the root password for the box. Is there any way I can find the password, or any way I can recreate it without knowing the original password? —Rusty Mays, rmays@ntr.net

When you get the LILO prompt, press the tab key. Find which kernel name is first (probably “linux”) and type

linux init=/bin/bash

Once you get a prompt, do the following:

mount -wno remount /
/bin/vi /etc/passwd
The old trick was to remove the password field (anything between the 1st and the 2nd colon), but some distributions (notably Red Hat) have a bug (or feature, depending on how you look at it) where it won't let you log in as root if there is no password, and also the password command will not work if the password field is blank. The passwd command should work and let you enter a new password even if you don't know the old one (and leave it in place). If that fails, another option is to replace the encrypted password with a known encrypted one, like yours. —Marc Merlin, marc_bts@valinux.com

The passwords used in UNIX/Linux are usually hard to crack, so the best thing to do is to boot from a Linux boot floppy, then edit the password file. Boot from a set of Linux boot floppies, either for an installation or one of the “Linux on a floppy” installations from http://www.toms.net/rb/. After booting from the floppy, mount the hard disc, then make a copy of the password file, just in case (either /etc/passwd or /etc/shadow), then edit the password file (with vi, pico, etc., or use sed and/or cut) to remove the password for root. Finally, unmount the hard disk and reboot, then log in as root and set the root password immediately. It's probably a good idea to check for other accounts with a UID of 0, and accounts you do not recognize. —Keith Trollope, kt57707@GlaxoWellcome.co.uk

I Can't Get No Resolution

My machine at home has a sis6215 chip, and Red Hat 6.0 doesn't have a driver for it. Probably because of this, when Gnome runs, the screen is zoomed and everything is huge. The default resolution is some 320x200. I tried to configure custom settings through Xconfigurator and also X11Config, but the resolution didn't change. Where am I stuck? Is there some problem with my monitor settings? —Pankaj Ratan Lal, prlal@quantum.ac.in

According to www.xfree86.org/3.3.6/SiS2.html#2, your chip isn't supported by XFree86. You can still try XFree86 3.3.6, but there aren't many chances it will work. If your chip is VESA 2-compliant, you have another option: use the VesaFB frame buffer, available at www.xfree86.org/FAQ/#FBDev. --Marc Merlin, marc_bts@valinux.com

The Dreaded Busy Signal

When I try to set up my modem and use the query modem function, I get a “modem busy” response. This also happens if I use dialup. I use COM3 for my modem, so I set Linux to tty2. I think this is correct. Is it conflicting with Windows? Any suggestions? —Don Hoornaert, richey@mb.sympatico.ca

Even though many things could be happening (misconfigured port settings, broken modem, misconfigured software, etc.), make sure you have all settings correct and try connecting directly to the modem with cu -l /dev/ttyofyourmodem. The “ttyofyourmodem” depends on which COM port you use; it could be ttyS0, ttyS1, ttyS2 or ttyS3 for COM1, COM2, COM3 or COM4, respectively. If you succeed in connecting to the modem this way and get an OK in response to an AT command, then you are okay. If you bought your computer with Windows pre-installed, it is probable that you have what is called a Winmodem, which is a crippled kind of modem for Windows only. If that is the case, you had better buy a modem that works with Linux. I have bought many 3COM USRobotics “Python” internal modem cards that provide 56K V.90 data/fax/voice services to my Linux servers with excellent results. Check this excellent web page for modem compatibilities: www.o2.net/~gromitkc/winmodem.html. Check the entire modem list table. There are some people trying to make Winmodems work with Linux, but to play safe, buy a new Linux-compatible one. —Felipe E. Barousse, fbarousse@piensa.com

Two Many Drives

I have two CD-ROM drives, one recently installed. Before the installation of the second CD-ROM which is an HP 9200i CD_RW, everything mounted okay. Now, when I issue the mount command (mount /mnt/cdrom), I get the following:

CD-ROM I/O error: dev 0b:00,sector 64 isofs_read-super: bread
failed,dev 0b:00 iso_blknum 16 block 32 mount: wrong fs type,
bad option, bad superblock on /dev/cdrom or too many file systems

Both are SCSI drives. Please help if you can. —Tom Mcloughlin, tommcl@pacbell.net

There are two likely reasons for this problem. Either your “second” CD-ROM is seen as “first”, or the devices are configured to use the same SCSI ID, thus preventing any of them from functioning. Please check how SCSI identifiers have been assigned to the drivers and remember that the smaller ID is considered “first” drive (/dev/sr0) and the bigger ID is considered “second” (/dev/sr1). —Alessandro Rubini, rubini@linux.it

/dev/cdrom is a symbolic link to a device like /dev/scd0 (the first SCSI CD-ROM). The second SCSI CD-ROM will be /dev/scd1. So, when wanting to mount the second CD-ROM, issue the command mount /dev/scd1 /mnt/cdrom, or create new links like /dev/cdrom0 to /dev/scd0 and /dev/cdrom1 to /dev/scd1. Don't forget to update the /etc/fstab, because mount /mnt/cdrom will read the fstab and mount the device allocated to this mounting point. —Paulo J V Wollny, paulo@wollny.com.br

Cannot Print from Linux

I have the following operating systems installed on my PII Intel 440Bx system: NT4/Windows 98/Linux. While I can print absolutely fine from Windows 98 and NT4 on my HP 670C printer, I cannot do so from Linux. The error I get is “printer port is not recognised”. I have tried using the printtool to force the HP 670C on lp0, lp1 and lp2, respectively, but to no avail. What could be the problem? I have even tried changing the BIOS setting between ECP and EPP. —Sunil Dhaka, dax@net4india.com

Are your printers parallel? If so, you might not have the parallel printer port driver configured correctly. Sometimes with Red Hat, the parallel port is not set up correctly after the installation. Add this line to the /etc/conf.modules file:

alias parport_lowlevel parport_pc

Reinitialize your machine, and your parallel port should now work fine. Configure everything with the printtool utility and send a test page to print. —Felipe E. Barousse, fbarousse@piensa.com

A local user I know, Scott Hettel, recently solved this problem on his own system. He found that Red Hat 6.1 does not support the IBM PC parallel printer port by default. The answer for this is on Red Hat's web site. See bug numbers 5698 and 5821 on their site for the resolution to this problem. You may also want to look at bug 8969, which discusses port compatibility. Please note that these issues affect only version 6.1 of Red Hat. —Chad Robinson, Chad.Robinson@brt.com

Swimming Up River

I'm trying to use mgetty with a serial port attached to a modem. The port is /dev/ttyS1. The line I put in /etc/inittab is:

S1:2345:respawn:/sbin/mgetty ttyS1

Shortly after the system came up after reboot, I received this message continuously at about five-minute intervals:
INIT: Id "S1" respawning too fast: disabled for 5 minutes.

Any ideas as to what I'm doing wrong? I'm running Red Hat 6.0. —Chris Yeats, CYeats@limbach.com

The message you get means that Linux starts the mgetty process and for some reason it dies, gets restarted and dies again. The most probable cause is that your modem cable does not have the correct pin wiring to work. Check www.linuxdoc.org/HOWTO/Text-Terminal-HOWTO-17.html#fast_respawn to find out a bit more about the problem. To override the cable problem (but losing modem control features), use the -r option for mgetty, which makes mgetty not monitor and detect the missing pin signals on your cable. I would still buy a good modem cable, though. —Felipe E. Barousse, fbarousse@piensa.com

Your mgetty ttyS1 command exits immediately and init disables its further invocation. You should first make the command work from the command line, where you can check what its error messages are and whether it works as expected. You should put the command in inittab only after your problems (misconfiguration, I suppose) are fixed. —Alessandro Rubini, rubini@linux.it

Sound Support

I use a Compaq Presario which came with an ESS sound chip, but I would like to use SB Vibra 128 instead. The problem is I cannot disable the ESS chip because there aren't any jumpers. Also, it's not possible to disable from BIOS menu. Is there any way to make my new sound card work under Linux? It seems as if both sound cards want to use the same resources. I am using Slackware version 7.0. —Chumpon Thamwiwat, thchum@rocketmail.com

Having no way to change settings of the ESS sound chip, maybe you can change the settings on the Vibra hardware. The driver configuration parameters may be of help also; many times, the driver indicates to the hardware which IRQ and address the device should use. If you do not load the driver for the ESS, then the ESS won't be activated, therefore you could load the driver for the Vibra, assuming there is no conflict of hardware settings and each board has its own drivers. —Felipe E. Barousse, fbarousse@piensa.com

Where in Carmen Sandiego Is xhfs?

I used to run SuSE Linux on a meek Gateway laptop with no problem; xhfs installed with it. Now I have a heated ASL Labs laptop and a tweaked version of Red Hat 6.1, and no hfs utilities or xhfs! I searched the Web and found hfs utilities, but not XHFS. Freshmeat and RPM had never heard of it. Also, I need help making my brand-new Ethernet cable connect my Power Mac 7600 and my laptop. I see the plugs, but have no clue what to do next. I have installed NetaTalk. —Hal, hsundt3@uswest.net

The hfs utilities package containing XHFS can be found at http://www.mars.org/home/rob/proj/hfs/. As for your Ethernet cable, you'll have to start with getting TCP/IP running. Configure your Mac and your laptop to be on a common subnet. Use 192.168.100.0 netmask 255.255.255.0, for example. —Marc Merlin, marc_bts@valinux.com

Resources

Many on-line help resources are available on the SSC web pages. Sunsite mirror sites, FAQs and HOWTOs can all be found at http://www.linuxjournal.com/.

Load Disqus comments

Firstwave Cloud