MoonPoint Support Logo

 


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



Advanced Search
August
Sun Mon Tue Wed Thu Fri Sat
     
18
19 20 21 22 23 24 25
26 27 28 29 30 31  
2018
Months
AugSep
Oct Nov Dec


Tue, Dec 12, 2017 11:25 pm

NetworkManager and nm-tool

If you wish to check the speed of network interfaces on a CentOS Linux system, if the nm-tool utility, is installed, then you can use it to determine the speed of the network ports.

$ nm-tool

NetworkManager Tool

State: disconnected

- Device: em1 ------------------------------------------------------------------
  Type:              Wired
  Driver:            bnx2
  State:             unmanaged
  Default:           no
  HW Address:        D4:AE:52:CD:0A:D4

  Capabilities:
    Carrier Detect:  yes
    Speed:           1000 Mb/s

  Wired Properties
    Carrier:         on


- Device: em2 ------------------------------------------------------------------
  Type:              Wired
  Driver:            bnx2
  State:             unmanaged
  Default:           no
  HW Address:        D4:AE:52:CD:0A:D5

  Capabilities:
    Carrier Detect:  yes

  Wired Properties
    Carrier:         off


$

If it is installed, the nm-tool program will likely be in /usr/bin . It is part of the NetworkManager package.

[ More Info ]

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

Sun, Dec 10, 2017 7:39 pm

Determining the version of CentOS on a system

If you are logged into a CentOS Linux system, there are a few ways you can determine the version of CentOS running on the system from a command-line interface (CLI), i.e., a shell prompt.

In the /etc directory, there should be a /etc/centos-release file containing information on the version of CentOS.

$ ls -l /etc/*elease
-rw-r--r--  1 root root  27 Mar 28  2017 /etc/centos-release
-rw-r--r--. 1 root root 152 Nov 25  2013 /etc/lsb-release
lrwxrwxrwx  1 root root  14 Apr 20  2017 /etc/redhat-release -> centos-release
lrwxrwxrwx  1 root root  14 Apr 20  2017 /etc/system-release -> centos-release
$ cat /etc/*elease
CentOS release 6.9 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphi
cs-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS release 6.9 (Final)
CentOS release 6.9 (Final)
$

To just see the version number, you can use one of the grep commands below.

$ grep -oE '[0-9]+\.[0-9]+' /etc/redhat-release
6.9
$ grep -oE '[0-9]+\.[0-9]+' /etc/centos-release
6.9
$

[ More Info ]

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

Tue, Mar 28, 2017 9:39 pm

Determining which packages were recently installed on a CentOS Linux system

I needed to determine which packages were recently installed on a CentOS 7 system where yum is used to install packages. The command rpm -qa --last will list all packages that have been installed in chronological order with the most recently installed packages listed first, since the --last option orders the package listing by install time such that the latest packages are at the top. E.g.:

# rpm -qa --last
amarok-utils-2.8.0-19.el7.x86_64              Fri 12 Aug 2016 09:02:34 PM EDT
amarok-libs-2.8.0-19.el7.x86_64               Fri 12 Aug 2016 09:02:34 PM EDT
amarok-2.8.0-19.el7.x86_64                    Fri 12 Aug 2016 09:02:31 PM EDT
taglib-extras-1.0.1-8.el7.x86_64              Fri 12 Aug 2016 09:02:17 PM EDT
mariadb-embedded-5.5.50-1.el7_2.x86_64        Fri 12 Aug 2016 09:02:17 PM EDT
qjson-0.8.1-4.el7.x86_64                      Fri 12 Aug 2016 09:02:15 PM EDT
kdelibs-webkit-4.14.8-1.el7.x86_64            Fri 12 Aug 2016 09:02:14 PM EDT
qtscriptbindings-0.2.0-5.el7.x86_64           Fri 12 Aug 2016 09:02:13 PM EDT
qtwebkit-2.3.4-6.el7.x86_64                   Fri 12 Aug 2016 09:01:57 PM EDT
alpine-2.20-2.el7.x86_64                      Mon 08 Aug 2016 10:13:54 PM EDT
fuse-sshfs-2.5-1.el7.x86_64                   Mon 08 Aug 2016 09:28:26 PM EDT
gpg-pubkey-352c64e5-52ae6884                  Mon 08 Aug 2016 09:27:13 PM EDT
epel-release-7-6.noarch                       Mon 08 Aug 2016 09:12:51 PM EDT
lynx-2.8.8-0.3.dev15.el7.x86_64               Fri 05 Aug 2016 10:28:17 PM EDT
telnet-0.17-59.el7.x86_64                     Sat 30 Jul 2016 04:34:17 PM EDT
thunderbird-45.2-1.el7.centos.x86_64          Sat 30 Jul 2016 04:10:55 PM EDT
mutt-1.5.21-26.el7.x86_64                     Sat 30 Jul 2016 03:50:58 PM EDT
<text snipped>
gnu-free-fonts-common-20120503-8.el7.noarch   Fri 15 Jul 2016 03:10:39 PM EDT
dejavu-fonts-common-2.33-6.el7.noarch         Fri 15 Jul 2016 03:10:39 PM EDT
libgcc-4.8.5-4.el7.x86_64                     Fri 15 Jul 2016 03:10:38 PM EDT
fontpackages-filesystem-1.44-8.el7.noarch     Fri 15 Jul 2016 03:10:38 PM EDT
control-center-filesystem-3.14.5-8.el7.x86_64 Fri 15 Jul 2016 03:10:38 PM EDT
#

[ More Info ]

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

Sun, Mar 26, 2017 5:10 pm

Unrar for Centos 7

I needed to convert a rar file to a zip file on a CentOS 7 Linux system. But when I tried installing an unrar package with yum, the package manager on the system, I found none was available from any of the software repositories the system was configured to check for packages.

# yum install unrar
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.firehosted.com
 * epel: mirror.us.leaseweb.net
 * extras: centos.aol.com
 * updates: mirror.umd.edu
No package unrar available.
Error: Nothing to do
# yum install rar
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.firehosted.com
 * epel: mirror.us.leaseweb.net
 * extras: centos.aol.com
 * updates: mirror.umd.edu
No package rar available.
Error: Nothing to do
#

I had previously installed support for the Extra Packages for Enterprise Linux (EPEL) repository, but though I thought the unrar package might be found there, it wasn't found. I did find an RPM file for the software, howerver, at RPM CentOS 7 unrar 5.0.12 x86_64 rpm. I downloaded that file with wget and, since yum can be used to install RPM files, installed it with yum.

[ More Info ]

[/os/unix/linux/centos/7] permanent link

Sun, Feb 26, 2017 10:23 pm

Obtainining info on the optical drive in a CentOS Linux system

If you need to determine the manufacturer, type, or model of optical disc drive that is in a CentOS Linux system, you can log into the root account and use the dmesg command and pipe the output into the egrep command looking for key terms, such as "cdrom", "dvd", "cr/rw", or "writer" as shown below:

# dmesg | egrep -i 'cdrom|dvd|cd/rw|writer'
[    1.571327] ata1.00: ATAPI: TSSTcorpCD/DVDW SH-S182M, SB02, max UDMA/33
[    1.598476] scsi 0:0:0:0: CD-ROM            TSSTcorp CD/DVDW SH-S182M SB02 PQ: 0 ANSI: 5
[    1.635809] sr 0:0:0:0: [sr0] scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
[    1.635819] cdrom: Uniform CD-ROM driver Revision: 3.20
#

[ More Info ]

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

Sat, Aug 13, 2016 9:38 pm

Determining which repository a package comes from

If you want to determine which software repository a package can be found in from a CentOS Linux system, you can use the repoquery command or yum info commands. A package doesn't have to be installed on the system for you to determine which repository it can be found in.

[ More Info ]

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

Fri, Jul 15, 2016 11:02 pm

Using the eject command on CentOS

To eject a CD/DVD tray on a CentOS 7 system, you can use the eject command. With no arguments given to the command on the command line, i.e., a shell prompt, the tray will be ejected. To retract the tray, you can use eject --trayclose or -t. You can use -T or --traytoggle to open the drive, if it is closed or close it, if it is open.

If you specify the -n or --noop option, information on the device will be shown, but no action is taken.

$ eject -n
eject: device is `/dev/sr0'

You can use eject --default to see the default name for the device.

$ eject --default
eject: default device: `/dev/cdrom'

[ More Info ]

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

Sat, Apr 09, 2016 10:48 pm

Fail2ban Logging

When I checked the fail2ban log on a CentOS 7 server today, I found that two IP addresses assigned to to a system or systems in China had been banned 385 times in the past week because of repeated failed attempts to break into the system via Secure Shell (SSH) logins. The IP addresses were:

183.3.202.183
183.3.202.184

When I checked for whether others had noted hostile activity from those IP addresses at the Internet Storm Center, I found that others had reported such activity from the two IP addresses starting on March 30, 2016 and continuing through today.

[ More Info ]

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

Thu, Apr 07, 2016 10:15 pm

Location of cron files on a CentOS system

I needed to know the last time crontab had been used to update the cron table (crontab) file for a user account on a CentOS 7 system, since an expected output file from a cron job that should have been created from the last modification to the cron file had not appeared. On a CentOS Linux system, the crontab files can be found in /var/spool/cron.
# ls -l /var/spool/cron
total 8
-rw-------. 1 jdoe jdoe 409 Apr  7 12:32 jdoe
-rw-------. 1 root root 542 Jan  1  2015 root

The files are used to schedule jobs to run periodically on the system and can be edited with crontab -e. A crontab file for an account can be viewed by issuing the command crontab -l while logged into that account.

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

Fri, Apr 01, 2016 10:48 pm

Using fail2ban on a CentOS 7 system

If you run a server that is accessible to anyone on the Internet, you should expect that many people and bots will attempt to break into the system, which is why you should ensure that all accounts have strong passwords. Many attackers will use a dictionary attack where they pair common account names, such as root, admin, administrator, etc. with every word in a dictionary. Or they may even pair a "name dictionary" with a dictionary for a particular language, such as English. Such dictionaries can be readily found on the Internet. Name dictionaries may be used by expectant parents looking for a name for their yet to be born child, but a malefactor may use such a dictionary as well as part of an attack against a system. E.g., an attacker may start with abe as a username and then try every word in an English language dictionary as a password. If he can't get in using abe as the user name, he might next try al, alan, ann, arthur, etc. going all the way up to names that start with the letter "z". Certainly pairing each name with every word in a dictionary would take an inordinate amount of time, if someone manually typed each username and password combination, but there is no need for an attacker to manually make guesses in an attempt to compromise a system. Instead, he can use a program that will read entries from dictionaries and submit them to the system under attack. A program can potentially submit thousands of guesses a minute if there is sufficient bandwidth between the attacking and attacked systems and sufficient CPU power on both systems. If you are responsible for a server, you are unlikely to want an attacker to have unlimited attempts to break into the system. The attacker will be using bandwidth to your server and system resources, such as CPU cycles, even if he never manages to break into the system. And, if even one user has a weak password, such as a dictionary word, sports team name, car name, etc., which may also be in a dictionary used for password guessing, granting an attacker unlimited attempts to try breaking in may result in the attacker being successful. One way to preclude an attacker from being able to submit an unlimited number of password guesses is with fail2ban.

[ More Info ]

[/os/unix/linux/centos] 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