krypted.com

Tiny Deathstars of Foulness

There are a number of ways to see information about what version of Linux that you’re running on different cat /etc/lsb-release Which returns the distribution information, parsed as follows: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04.5 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu Precise Pangolin (LTS)" LSB_release can also be run as a command, as follows: lsb_release -a Which returns the following: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu Precise Pangolin (LTS) Release: 12.04.5 Codename: precise lab_release can be used as a command as well: cat /etc/issue.net Which returns: Ubuntu Precise Pangolin (development branch) In Debian, you can simply look at the version file: cat /etc/debian_version Which returns the following: wheezy/sid Or Red Hat Enterprise can also be located with /etc/issue.net: cat /etc/issue.net With many variants, including OS X, you can also use uname to determine kernel extensions, etc: uname -a The thing I’ve learned about Linux is that there’s always a better way to do things. So feel free to comment on your better way or favorite variant!

March 5th, 2015

Posted In: Ubuntu, Unix

Tags: , , , , , ,

RPM is a package manager available for most versions of Linux. The rpm command is used to install and uninstall software from the command line. Once software is installed, you can use the -q option to query for installed packages. The -a option shows all. So to see a list of all packages installed, use both: rpm -qa When you locate the name of a package you’d like to know more about, use the -i to get more information, along with the -q to query, followed by the name of the package: rpm -qi libcap This shows a list of all the files installed as part of the package.

September 19th, 2013

Posted In: Ubuntu, Unix

Tags: , , ,

When you remove a RHEL system with StorNext FX running on it from the network that has an Xsan the system won’t boot properly any longer. There are two things that need to happen in order to get around this. When done proactively the system can safely be moved. When done reactively, you’ll need to boot using the “I” key and disable all of the cvfs and fsmpm entries during the boot process. Once booted, or if being done proactively, edit fstab and then remove the cvfs files. First, we’re going to edit /etc/fstab. Simple open it in vi and then put a # in front of each line that contains any mounts that say cvfs in the line. Once done, create a folder to put your old cvfs files into: mkdir /disabled Then, we’re going to need to move the cvfs files and folders, mostly stored as /etc/init.d/cvfs, /etc/init.d/cvfsold and the contents of /usr/cvfs: mv /etc/init.d/cvfs /disabled/ mv /etc/init.d/cvfsold /disabled/ mv /usr/cvfs /disabled/ Next, reboot and you should be good. If you remove a system from a network and only edit fstab then it will still lock up when loading the fsmpm, so make sure to do all the steps indicated. You can then re-activate StorNext by uncommenting the lines in /etc/fstab and putting the files back by running the following: mv /disabled/cvfs /etc/init.d/cvfs mv /disabled/cvfsold /etc/init.d/cvfsold mv /disabled/cvfs /usr/cvfs Then reboot and voila, you’re back on the SAN. Good luck!

September 14th, 2013

Posted In: Ubuntu, Unix, Xsan

Tags: , , , , ,

vsftpd supports custom welcome banners. By default the vsftpd configuration files are stored in /etc/vsftpd. The main config file is /etc/vsftpd/vsftpd.conf. In this file there are two ways to display a banner. The banner_file parameter will allow you to build nice spiffy banners with multiple lines and paragraphs even (ASCII pr0n if you roll like that): banner_file=/etc/vsftpd/welcome.banner Or for simple setups (most are), the ftpd_banner parameter lets you configure a single line welcome string for unauthenticated users. Make sure this doesn’t wrap to the next line or the daemon won’t start. ftpd_banner=Welcome to krypted.com. The daemon will need to get restarted once changed. The easiest way to do this is to use /etc/init.d/vsftpd: sudo /etc/init.d/vsftpd restart

April 21st, 2011

Posted In: Ubuntu, Unix

Tags: , , , , , ,

Using CentOS or Red Hat Enterprise Linux (RHEL) 5, install and run Wireshark over the command line.  To install Wireshark, use yum:
yum install wireshark
Run a capture:
tethereal -i eth1 -w ~/mycapture.pcap
This command will run a Wireshark capture on the eth1 interface and output the data to a file called mycapture.pcap in your home directory.  You can then view this file in the X11 interface for Wireshark or grep it for specific information.

April 14th, 2007

Posted In: Ubuntu, Unix

Tags: , , , , , ,