Best of Technical Support

Our experts answer your technical questions.
Removing a Boot Manager

How can I remove the boot manager from the master boot block of my hard disk? —Ralph Wu

A Linux Solution

A backup copy of your MBR is stored in /boot when first installing LILO. You can restore it with:

dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1     (IDE-Disk)
dd if=/boot/boot.0800 of=/dev/sda bs=446 count=1     (SCSI-Disk)

Klaus Franken, S.u.S.E. GmbH kfr@suse.de

A DOS Alternative

Find any MS-DOS boot disk with fdisk.exe on it. Execute fdisk with the undocumented parameter /mbr:

fdisk /mbr

It may appear not to work since this usage will return no messages and will exit immediately. It will overwrite your master boot record with a fresh copy, and LILO, Bootlin or whatever other boot manager you may be using will be gone.

Chad Robinson, BRT Technical Services Corporation chadr@brtgate.brttech.com

E-mail Error Message

I have a small network of Sun SPARC Solaris 2.4-based machines and a couple of Linux systems. The Suns use NIS+ and the Linux systems use /etc/hosts files to know about other hosts on the net. My problem is that I cannot send e-mail from a Linux system to another host. I have no problem when I am connected to the Internet using DNS to resolve host names. Why can't sendmail resolve a host name from /etc/hosts? I have no problem with telnet or FTP, but sendmail always says unknown host.

—Tim Bower

Configuring Sendmail to Use DNS

Your sendmail must be configured to not use DNS.

If you use the m4-macros, try /usr/doc/packages/sendmail/cf/linux.smtp-nodns.mc:

include(`../m4/cf.m4')
VERSIONID(`linux for smtp-only without dns setup'dnl
OSTYPE(linux)
FEATURE(nouucp)dnl
FEATURE(always_add_domain)dnl
FEATURE(nodns)dnl
MAILER(local)dnl
MAILER(smtp)dnl

If you edit your /etc/sendmail.cf, try the following parameters:

# service switch file (ignored on Solaris, Ultrix, OSF/1, others) O ServiceSwitchFile=/etc/service.switch

# hosts file (normally /etc/hosts)
O HostsFile=/etc/hosts

Then you have to create a file /etc/service.switch:

hosts   files
aliases files

Klaus Franken, S.u.S.E GmbH kfr@suse.de

Modem Won't Hang Up

We are attempting to set up a dial-in server for the Internet site at our community college. We are using Getty_ps and have it up and working fine but cannot figure out how to get the modems to hang up automatically when the user exits the system. Any suggestions on how we can accomplish this? --Barre BullPrince George's Community College

Use Mgetty Instead

Getty-ps may be capable of what you are trying to do, but since you are using it specifically for modem dial-in lines, you should take a hard look at Mgetty. Mgetty is a getty replacement specifically designed for use with modems. It supports almost all of the capabilities that Getty-ps supports alone.

I recommend it since it is designed explicitly for a modem. You should find it much better suited to your task.

You can get Mgetty from any Sunsite mirror. You will find that it also has support for FAX and voice capable modems.

Chad Robinson, BRT Technical Services Corporation chadr@brttech.com

Root Password Won't Change

I've just loaded Linux and I can't add/change my root password. It says that I'm denied access, but when I do change attributes and reboot the system, the system defaults back to where it was: root access with no password protection.

—Dan Sapach

Try This

Have you possibly cleaned up files in your [cw]/etc[ecw] directory? Several files there are not meant to be cleaned up, and doing so will cause change-password attempts to fail. You should have /etc/passwd, /etc/passwd.OLD and /etc/passwd.old.

Also be sure your /usr/bin/passwd is setuid to root. If it isn't, try:

chown root.bin /usr/bin/passwd
chmod 4711 /usr/sbin/passwd

Finally, make sure that only root can modify /etc/passwd:

chmod 644 /etc/passwd

Chad Robinson, BRT Technical Services Corporation chadr@brttech.com

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix