MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
July
Sun Mon Tue Wed Thu Fri Sat
 
17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
2019
Months
JulAug Sep
Oct Nov Dec


Wed, Nov 05, 2014 8:15 am

Denying interactive logins for an account

On a Linux system, you can change the designated shell for an account to "nologin" to prevent user's from interactive logons. For instance, if an account is only used for email, then you might wish to block the user from logging in and obtaining a shell prompt, so that should anyone else obtain the password for the account the person whould not be able to do anything other than send and receive email for the account. If the user's account was jasmith, you could use the command below:
# usermod --shell /sbin/nologin jasmith

[/os/unix/linux/sysmgmt] permanent link

Sat, Jun 09, 2007 5:50 pm

Installing Yum on a RedHat 9 System

For a RedHat Linux 9 system, I wanted to install Yum, which is an automatic updater and package installer/remover for Linux systems that use RPMs to manage installed software. I checked to see if Yum was already installed, but it was not installed.

# rpm -qa | grep -i yum

The Yum Download webpage listed the requirements for the latest version of Yum, version 3.2.0, as python 2.4+ and rpm 4.3 and above. I checked the version of the python and rpm packages on the system, but found they were not at the required versions.

# rpm -q --last rpm python
rpm-4.2-0.69                                  Sat 08 Nov 2003 02:37:24 PM EST
python-2.2.2-26                               Sat 08 Nov 2003 02:37:22 PM EST

Instead I needed to get a much earlier version, 2.0.8, which only required python 2.1+ and rpm 4.1.1-4.3.1. After downloading the rpm file, I installed it with rpm --install yum-2.0.8-1.noarch.rpm. I then checked for updates for the system with yum check-update.

An update was available for tcpdump among other utilities. An rpm -q --last tcpdump command showed the following information for the version already installed on the system:

tcpdump-3.7.2-1.9.1                           Sat 08 Nov 2003 08:39:55 PM EST

I tried updating tcpdump with yum install tcpdump, but received the error message below:


# yum install tcpdump
Gathering header information file(s) from server(s)
Server: Red Hat Linux 9 - i386 - Base
Server: Red Hat Linux 9 - Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
Dependencies resolved
I will do the following:
[update: tcpdump 14:3.7.2-7.9.1.i386]
Is this ok [y/N]: y
Downloading Packages
Getting tcpdump-3.7.2-7.9.1.i386.rpm
retrygrab() failed for:
  http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/9//x86/i386/tcpdump-3.7.2-7.9.1.i386.rpm
  Executing failover method
failover: out of servers to try
Error getting file http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/9//x86/i386/tcpdump-3.7.2-7.9.1.i386.rpm
[Errno 4] IOError: HTTP Error 404: Not Found

When I checked the Duke University wepage at http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/9/x86/, I found it had only one file in that directory. So I needed to add another repository for updates to software for RedHat 9 systems. I found a list of such sites at http://fedoralegacy.org/download/fedoralegacy-mirrors.php. Many of those I checked in the US also no longer had the files available for download. But the DataPipe one at http://mirror.datapipe.net/fedoralegacy/ did still have files available.

I added the following line to the updates section of /etc/yum.conf

baseurl=http://mirror.datapipe.net/fedoralegacy/redhat/9/updates/i386/

The yum.conf file now has the following information in it:


[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1

[base]
name=Red Hat Linux $releasever - $basearch - Base
baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/


[updates]
name=Red Hat Linux $releasever - Updates
baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/
baseurl=http://mirror.datapipe.net/fedoralegacy/redhat/9/updates/i386/

I then ran yum install tcpdump again and this time was able to update tcpdump. Checking the version of the rpm installed afterwards, I saw the following:

# rpm -q --last tcpdump
tcpdump-3.7.2-7.9.4.legacy                    Sat 09 Jun 2007 05:08:22 PM EDT

Yum 2.0.8-1 Download Sites
Duke University
MoonPoint Support

References:

  1. Yellow Dog Updater (YUM)
    Linux@DUKE
  2. RPM Package Manager
    Wikipedia, the free encyclopedia
  3. RedHat 9 Updates - Using Fedora Legacy
  4. Mirror sites by country
    The Fedora Legacy Project

[/os/unix/linux/sysmgmt] permanent link

Sun, Sep 19, 2004 8:58 pm

Logrotate PPP Error

After first setting up a Linux server with Fedora Core 2 Linux, I received the following error message in an email message sent to root:

Date: Sun, 12 Sep 2004 19:00:42 -0400
From: root@mail.somewhere001.us (Anacron)
To: root@mail.somewhere001.us
Subject: Anacron job 'cron.daily'

/etc/cron.daily/logrotate:

error: stat of /var/log/ppp/connect-errors failed: No such file or directory

According to Bugzilla Bug 126771: logrotate error because of non-existent /var/log/ppp/connect-errors this error can be prevented by adding a missingok to /etc/logrotate.d/ppp. The problem occurs if PPP isn't used, which means there won't be a log file for it in /var/log/ppp. By adding the missingok to /etc/logrotate.d/ppp, you indicate that an error message shouldn't be produced if the log file is missing and so can't be rotated.

According to Bug 122911 - Logrotate problem if ppp isn't used and there isn't a logfile in /var/log, the problem is present in version 2.4.2 release 2 of the ppp package. I didn't add the missingok line, but instead upgraded the ppp package (use up2date --install ppp). I now have version 2.4.2 release 3.FC2.1 of ppp, which added the missingok line.

# Logrotate file for ppp RPM

/var/log/ppp/connect-errors {
        missingok
        compress
        notifempty
        daily
        rotate 5
        create 0600 root root
}

[/os/unix/linux/sysmgmt] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo