Best of Technical Support

Our experts answer your technical questions.
Pre-installed Slackware

I picked up a used laptop that has Slackware partitioned on the hard drive. Is there any way to log in to it without the password? I have a UNIX book but it does not address this problem. Do I have to re-install? I have no idea who the previous owner was. —Mike, shbecke@ibm.net

Try to boot the computer in single user mode (type linux single at the LILO prompt). If this does not work, you should get boot floppies in order to start a minimum LINUX in a RAM disk. Such floppies should be available in a Slackware distribution. Then you could mount the root partition by typing:

mount -t ext2 /dev/hda1 /mnt

and edit /mnt/etc/passwd in order to suppress the root password. —Pierre Ficheux, pficheux@com1.fr

One of the simplest ways to do this is to obtain a boot and root disk pair from the Slackware distribution. Boot using both and use mount(8) to mount the root file system from your laptop. You can then edit the mount_dir/etc/passwd (or mount_dir/etc/shadow) file to remove the password.For system administrators concerned with this potential security problem, the only way to prevent it is through the use of BIOS features that prevent access to the floppy drive without a password. This is not a Linux security flaw—any UNIX platform that may be booted from a set of floppies or from a CD-ROM that allows access to the hard drive has the potential to be “hacked” in this way. Notable exceptions are systems that use encrypted file systems, but those are rare and often much slower during normal operation. —Chad Robinson, chadr@brt.com

Software in RPMs

I have Slackware Linux. Wherever I look, I find software that is in RPMs. Is there no option other than shifting to Red Hat? Any conversion utilities? —Aseem Asthana, asthana@bom4.vsnl.net.in

Try the package www.chez.com/imil/stuff/rpm4everyone.tar.gz; I use it every day on an old Slackware 3.0 distribution. —Pierre Ficheux, pficheux@com1.fr

Try alien, a package that converts packages from one format to another. Otherwise, compile rpm on your system so you can do the following:

rpm2cpio package.rpm | cpio -list
rpm2cpio package.rpm | cpio -make-dirs -extract

It is quite handy. Note, however, that you might find incompatibilities between your system and the Red Hat packages. I always prefer compiling programs from source when I am on Slackware (but I might be overly cautious). —Alessandro Rubini, rubini@prosa.it

a.out

I just installed Red Hat's Linux 5.0. I used the C compiler to compile a simple C program, test.c, using the command:

gcc test.c

The program compiled and produced an executable called a.out. When I try to run a.out by typing:

a.out
I get a message that says a.out is not a recognized command. What am I doing wrong? —Jeff Miller, jeff_miller@msn.com

First confirm that the a.out file has the correct permissions. Use ls -al a.out to confirm that the executable (x) bit is set. If it isn't, use the chmod +x command to set this flag. If the permissions are correct, specify the full path to the file, as the current directory usually isn't in your default path. Use ./a.out to ensure you are attempting to execute the correct program. Change your path by editing the /etc/profile file or the profile file in your home directory. —Vince Waldon, vince.waldon@cnpl.enbridge.com

Disk Space

How do I find out how much free space is left on my disk? —Kirk, sci@wadi-petro.com

Use the df command. Briefly, running df without arguments will show the free space (in KB) on all your disks; df /some_directory will show the space left on the disk that /some_directory is on. Also note that df has an undocumented -h option that shows sizes in GB or MB as appropriate—convenient for today's large disks. See the man pages for information on other options. —Scott Maxwell, s-max@pacbell.net

Relaying E-mail

The problem is the following. Each time I try to send an e-mail using a program that manages pop3 accounts such as Eudora or Netscape Mail, I receive the following message: “The recipient user@domain.com is not acceptable to your SMTP server. The message is not sendable until the recipient has been changed.”

This problem appeared after we upgraded from the previous version of Linux to version 5.0. No problem occurs when receiving e-mail using these programs or when sending e-mail through Pine—only when using Eudora or any other similar program. How can we solve this? —Ricardo A. Williams L., rick@corotu.stri.si.edu

The problem is in the new security policies of Red Hat 5. Your mail gets refused with a message of “551 we do not relay”. The solution here is authorizing your client machine to relay mail through the Linux server. Your /etc/sendmail.cf is quite clear about the options:

# file containing IP numbers of machines which can
# use our relay
F{LocalIP} /etc/mail/ip_allow
# file containing names of machines which can
# use our relay
F{LocalNames} /etc/mail/name_allow
# file containing names we relay to
F{RelayTo} /etc/mail/relay_allow

Add lines to the proper file describing either the client's IP, the client's name or the recipient's name. —Alessandro Rubini, rubini@prosa.it

______________________

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