Best of Technical Support
Distributing /etc/shadow
I am hunting for a utility that I think already must exist somewhere. Here is the problem. Government computers need to have all passwords updated more frequently these days, including the root password. Until now, we had so many flavors of hardware and OSes that the thought of SSHing a copy of /etc/shadow or /etc/passwd to all machines was a moot point, simply because the different OSes required different entries for root. Overwriting the root entry on a machine with the syntax for the wrong OS was not worth it. I suppose the biggest problem with doing a blind overwriting of the files would result in possibly incorrect shells or login paths for root. However, we have been working at getting rid of all of the non-PC workstations we had (SGIs, Suns, HPs and so on) so we can attack the virus and patches problems with hopefully one OS to worry about. This means we simply can plop a new copy of the root entry for /etc/shadow or /etc/passwd to all machines via SSH.
Do you know if such a tool
exists? I imagine some sort of script has been
written that can be tweaked easily to propagate
the changes. Some machines are on a domain with a
DNS server. The ones not running DNS are running
NIS. I am not familiar with the DNS ones yet, but I
know the ones running NIS still have to have
root changed locally. So far, we have been telnetting
or SSHing to each machine one at a time to get the new
root password in, because the root password won't map
to each machine. The machines need the root accounts
updated, especially if we were to need to go to single-user mode.
—
Irene Paradis
irene.paradis@us.army.mil
NIS has been used classically to solve this problem. However, there is
really only one solution for the root password: you should update the
/etc/shadow file. You also could use a RADIUS server.
—
Christopher Wingert
cwingert@qualcomm.com
You can use rdist to push many copies of a file out
to your hosts. See www.magnicomp.com/rdist.
Alternatively, you could disable, or “star out” the
root password by putting a * in the encrypted password
field of /etc/shadow, and use sudo for everything.
—
Don Marti
dmarti@ssc.com
How to Pass an Option to the Kernel?
What does the “Try linux noacpi,
linux disableapic and linux
noacpi disableapic” suggestion on page 72 of the October 2004 issue mean
in response to a Fedora install question? My
AMD dual-MP 2800+ regularly crashes and screen dumps. I just noticed a
comment about acpi or apic—I need to read and record next
time—on the
last screen dump. Having just read the article, I was excited to reboot
and try those commands, but I couldn't locate them.
—
Doug Baker
cfdbaker@qwest.net
You are asked to pass noacpi or
ldisableapic or
noacpi disableapic as a command-line option to the
kernel. When the bootloader, GRUB or LILO, is asking
which OS or kernel to boot, you can
add these options. On LILO, press Ctrl-X to get a command line,
and then type linux noacp. I
am assuming that Linux is one of the options in the
LILO menu.
If this works outs for you, you can add this to
/etc/lilo.conf permanently.
—
Usman Ansari
usmansansari@yahoo.com
On the GRUB bootloader, the default for
Fedora, the process is similar. Check out
the Unofficial Fedora FAQ at
www.fedorafaq.org/#otherinstall.
—
Don Marti
dmarti@ssc.com
Testing CPU under Different Loads
I frequently test Linux machines as part of my job and am looking
for a way to load the CPU smoothly from 0% to 100% to see what happens
to certain applications. When I try to apply a smoothly ramping CPU load,
I usually get either 0% or 100% CPU usage. If I try to sleep for very
small increments, I get 0% alternating with 100%. Do you know of any tool
or proven way to ramp the CPU?
—
Patrick Killelea
p@patrick.net
You could run a program that alternates some CPU-intensive task, such as generating pseudorandom numbers, with calls to usleep. Tweaking the values of BUFSIZE and USLEEP in this program lets me get a range of CPU loads:
/* Build with 'gcc -Wall load.c -o load' */
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#define BUFSIZE 1024
#define USLEEP 10000
char buf[BUFSIZE];
int main (int argc, char **argv)
{
int f;
f = open("/dev/urandom", O_RDONLY);
while (1) {
read(f, &buf, BUFSIZE);
usleep(USLEEP);
}
return 0;
}
Thanks to Greg Kroah-Hartman for cleaning up the above code. See man
usleep. To exercise individual CPUs on an SMP machine, try the CPU
affinity system calls covered in Robert Love's article “CPU
Affinity” in the July 2003 issue.
—
Don Marti
dmarti@ssc.com
Single-User Mode
How can I enter single-user mode, runlevel 1, at
boot time?
—
Arthur Schroeder
showmeyr@yahoo.com
Edit your boot line in GRUB and add a single to the command line.
—
Christopher Wingert
cwingert@qualcomm.com
You can type single at the LILO
or GRUB prompt to boot your Linux machine into single-user mode. If you
always want to boot in single-user mode for some reason, you can modify
LILO or GRUB and pass single as an option to the kernel. Or, you can modify
the /etc/inittab file. There is a line at the top of this file—mine
reads id:3:initdefault on my Red Hat 9.0 Linux
box—in which you can
replace 3 with 1.
—
Usman Ansari
usmansansari@yahoo.com
Luke 5:37–38
I am attempting to install Red Hat Linux 7.1 on my
new Dimension 4600 Dell computer. The installation CD
starts, and I have the option to choose the kind of
installation I want. Whatever I choose, after
the computer starts to recognize my hardware—it
recognizes my CD-ROM and hard drives—it stops and
freezes. I can do nothing but turn off
my computer.
—
Joe Pietro
jm_pietro@hotmail.com
Before you waste too much time,
you should use a newer Linux distribution. Red Hat
7.1 is several years old. Chances are you will
have much better luck with a newer version. I
suggest you use Fedora Core 2. Fedora Core,
a branch of Red Hat, always has supported
Dell hardware for the most part. You can download
it from www.redhat.com.
—
Usman Ansari
usmansansari@yahoo.com
Red Hat 7.1 has no active source of security updates. It
sounds like your hardware has some security sense. See fedoralegacy.org for support for older versions of Red
Hat Linux. If you want a quick check on whether hardware is working and
Linux-compatible before installing, try the bootable CD distribution
Knoppix from knoppix.org first.
—
Don Marti
dmarti@ssc.com
Setting Serial Ports for USB-to-Serial Adapters
I have an application that attaches to multiple remote serial devices
via multiple USB to serial adapters. Is there a way to specify that each
USB device enumerates as a specific USB serial port, regardless of the order
in which the USB ports are connected? For example, I always want USB port
x to enumerate as
/dev/usb/ttyUSBy.
Because this application will be hosted in more than 200 locations, and it is
possible that the USB serial adapter might be replaced or upgraded with a
newer unit, solutions based on serial numbers of the USB device are not
optimum.
—
Jeff Dennison
If you are using the 2.6 kernel, udev can do this matching for you.
Simply define a rule based on something unique for a
specific USB-to-serial device and use that to name the device. You
mention that serial numbers will not work for you—try using the
topology of the USB device or something else that you can determine is
unique—uniqueness is the key here.
If you are using the 2.4 kernel, good luck. You can muck around in the
/proc/tty/drivers/usb-serial directory to try to determine which device
is attached to which /dev/ttyUSB node, but it's a bit difficult—one big reason to switch to a 2.6 kernel.
—
Greg Kroah-Hartman
greg@kroah.com
Setting Compiler Options for Gentoo
I'm a newbie trying to install Gentoo from a live CD using
a stage3 tarball. I've managed to get to the stage for optimizing my
distro. I'm supposed to flag various options using GCC make.
I need only enough to get working and understand the
basics at this time. Any advice?
—
Rebelrouser
Rebelrouser@blueyonder.co.uk
Stick to the settings already given for your live CD if you do not know
what to change. These settings already are present in the /etc/make.conf
file. Consult the Gentoo installation guide for more information on
this and how to install Gentoo properly.
—
Greg Kroah-Hartman
greg@kroah.com
Fedora Install Hangs
I am installing Fedora. During installation, at
Display Setting for the monitor, I choose color depth 256 and click OK.
But then my screen freezes and the display is unreadable (blue screen).
I don't have any command prompt. Please help.
—
Chris
fiston63@hotmail.com
You can decline to configure the graphics card and X. Once you have booted
after the installation is complete, try to configure X. Use the
lspci -vvv command to see what kind of card you have. If support for
your video card is not present, try the manufacturer's Web site for
available drivers.
—
Usman Ansari
usmansansari@yahoo.com
Faking Out the Oracle Installer
Does anyone know of a way to fool the Oracle
10g installer into thinking Slackware is Red Hat, so
it at least tries to install? If not, does anyone know
how it detects that Red Hat isn't there?
—
Blake Tullysmith
bdt@vipretech.com
You can use a tool called strace on the installer:
# strace oracle-installer
From here, you can figure out what the program is looking for when it
refuses to install.
—
Christopher Wingert
cwingert@qualcomm.com
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Home, My Backup Data Center
- A Topic for Discussion - Open Source Feature-Richness?
- Dart: a New Web Programming Experience
- Developer Poll
- What's the tweeting protocol?
- May 2013 Issue of Linux Journal: Raspberry Pi
- Reply to comment | Linux Journal
18 min 20 sec ago - great post
53 min 13 sec ago - Google Docs
1 hour 15 min ago - Reply to comment | Linux Journal
6 hours 4 min ago - Reply to comment | Linux Journal
6 hours 50 min ago - Web Hosting IQ
8 hours 24 min ago - Thanks for taking the time to
10 hours 1 min ago - Linux is good
11 hours 59 min ago - Reply to comment | Linux Journal
12 hours 16 min ago - Web Hosting IQ
12 hours 46 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
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.




Comments
Video Question
Here are my Specs:
PC:
Dell Dimension P3 (I know it was a gift...)
Nvida Riva TNT w/16 Megs RAM
OS:
Feodra Core 3 (single boot system)
(When I boot up it says that my BIOS fails the cut off date of 2001)
Here's the problem:
When I run anything with Open GL the CPU load goes through the roof and my computer slows to a crawl. Is there any way to optimize either my Open GL settings, PC/Video Card BIOS, and/or the OS so that I can get maximum performance?
Any help would greatly be appreciated,
Thanx in advance,
Ragaphreak