Best of Technical Support
I have a couple of questions. First, how would you create a backup user for root with the same privileges as root? Second, is there a way to allow users to log in only within a specific time frame? An example of this would be to allow a user to log in between the hours of 6 A.M. and 6 P.M., but not to allow logins outside of this window.
—Jerry Fulkerson, hrlinkin@aol.com
To add a second root account, edit /etc/passwd and /etc/shadow (using vipw and vipw -s). In both files, duplicate the line with root and change the name to backuproot.
—Marc Merlin, marc_bts@valinux.com
Regarding control of login time, there are several ways of doing it. Using the Pluggable Authentication Modules (PAM) system's pam_time module is one of them, for instance. The file /etc/security/time.conf could have the line:
login;*;joe;Al0600-1800
This means the user joe is allowed to use the service called login, from any terminal (*), all days (Al) only during 06:00 and 18:00 hours. Be aware that this requires the entry:
login account required pam_time.so
on the PAM configuration file, which is usually at /etc/pam.conf or alternatively, the file named login to be within /etc/pam.d/ and containing:
account required pam_time.so
A good PAM reference can be found at www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam.html#toc4.
—Felipe E. Barousse Boué, fbarousse@piensa.com
Currently, I use Red Hat 7.0 on PCs in my computer programming lab. These computers use DHCP to connect to the building network and the Internet. Recently I attempted to upgrade these machines to a stock version of Red Hat 7.2. I have been unable to get computers to connect via DHCP. I have tried to configure the card and networking using the various GUI tools but have had no success.
—Bill Hummel, hummelb@readingsd.org
Looks to me that you are having trouble connecting because of two possible issues. First, you have not configured the DHCP client to connect to the network. I just did it on a Red Hat 7.2 machine by having the minimally configured file /etc/sysconfig/network-scripts/ifcfg-eth0 for network interface eth0 as:
DEVICE="eth0" BOOTPROTO="dhcp" ONBOOT="yes"
This will provide enough information for the system to boot up, and when starting networking facilities, to look for an IP address provided by a DCHP server. Second, you probably set a firewall or network filter that is not allowing DHCP to work properly. Did you request a “high” security level when installing? Just one time, get rid of the ipchains setup that Red Hat 7.2 sets up by commenting all lines in /etc/sysconfig/ipchains and then try step one.
—Felipe E. Barousse Boué, fbarousse@piensa.com
When (and why) is it necessary to put ./ in the beginning of a command line?
—Murray Zangen, murray@nj.com
The ./ means current working directory. You need to put ./ in front only when you want to run a program in the directory you are in, and that directory is not in the PATH shell variable ($PATH).
—Usman Ansari, uansari@yahoo.com
The reason the current directory is not in the path is due to security concerns. If an adversary installed a Trojan ls command in the /tmp directory and you cd-ed into /tmp and typed ls, you would run the adversary's program. If you really don't like having to type ./, place the current directory at the *end* of your PATH shell variable, this will make your file system surfing safer.
—Christopher Wingert, cwingert@qualcomm.com
I have created a configuration file stored in the directory /etc. I have been trying to open this file from a C program without success:
struct file *filp;
char *Filename = "/etc/pg.conf\0";
filp = filp_open(Filename,00,O_RDONLY);
if (IS_ERR(filp)||(filp==NULL))
return;
Could someone advise me how to fix this?
—Senthil, senthil@singnet.com.sg
I believe that you do not have the parameters correct to filp_open(). Try
filp = filp_open( Filename, O_RDONLY, 0 );
—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?
- What's the tweeting protocol?
- Dart: a New Web Programming Experience
- Developer Poll
- Trying to Tame the Tablet
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.




2 hours 5 min ago
4 hours 38 min ago
5 hours 55 min ago
6 hours 30 min ago
6 hours 52 min ago
11 hours 41 min ago
12 hours 28 min ago
14 hours 1 min ago
15 hours 38 min ago
17 hours 36 min ago