linux

Red Hat (RHT) Profits Soar, is Novell (NOVL) Next?

Monday, December 22nd, 2008 | Techie | 1 Comment

With a global recession looming over the heads of many corporations, they are becoming creative to cut costs in all aspects of business including the “overhead cost” of IT.

It seems with Red Hat’s latest numbers released today, that companies are indeed switching from higher cost Unix systems, and Windows systems to Linux distributions. The following quote was taken from Yahoo Associated Press:

“In this budget-constrained environment, IT professionals are adopting open source and more specifically Red Hat to save money and enhance their competitiveness,” said Red Hat Chief Executive Jim Whitehurst in a statement.

It makes me wonder, will Novell be another gainer of the possible long term recession? Also, Novell has been very aggressive in their sales, and if it gets them into the door at some bigger corporations, that means massive growth when the subscription rate goes back from the initial buy price, to their normal maintinence cost.

Now, I guess the thing that really matters is NOVL vs RHT market share in the Linux Server Space.

Another thing to take note is neither really has a grasp on the Desktop space, but is that next? If so, then I see NOVL having a grand advantage their with SLED 11, as it will have much better integration in a “Windows World” including, but not limited to, NOMAD.

Tags: , , ,

How to Mount an ISO Images in Linux (openSUSE)

Sunday, November 2nd, 2008 | SuSE Linux, Techie, Ubuntu / Kubuntu | 1 Comment

I’m sure by now everyone has heard of an ISO image. But some may not know that with Linux you can mount it quite easily without burning the image to a CD.

This is actually made possible by an option of the mount command, if you haven’t used the mount command simply type:

man mount

To find out some of its uses (please spare the obvious jokes from that command).

The option of mount that allows us to mount an iso is the loop option. Loop will actually create a device in /dev/loopX for the mounted iso.

I’ll stop the blabbering and give you the command to mount an iso image using the mount command:

sudo mount -o loop -t iso9660 /location/of/filename.iso /mnt/iso

For the above command to work, I would have to have a directory in /mnt called iso, which can be made by running

sudo mkdir /mnt/iso

.

I think my next set of writings will be around the usage of RPM.. Or maybe just make a single comprehensive RPM usage list.

Tags: ,

Script for disabling users (follow up for creating user)

Thursday, October 30th, 2008 | SuSE Linux, Techie, Ubuntu / Kubuntu | 4 Comments

Just to follow up on my Blog posting of the creating users script, I give you my script for disabling users (disabling etc may come to follow).. So without further a-do, here we go:

PATH=$PATH:/usr/local/bin:/usr/bin:/usr/sbin:/sbin
PGM=`basename $0`

if [ $(id -u) -eq 0 ]; then

# Logging information
DATESTAMP=`date +%Y%m%d`
TIMESTAMP=`date +%H%M%S`
LOGDIR=/var/log/$PGM

# Find out who I am
ME=`whoami`

while [ $# -ge 1 ] ; do
case $1 in
-h*)
echo “Use: $PGM account”
exit
;;
-*) die “$PGM: unknown option \”$1\”" ;;
*) USER_TO_DIS=$1 ;;
esac
shift
done

# If no user is defined we have to get one
while [ "$USER_TO_DIS" = "" ] ; do
echo -n “Who do you want to disable? “
read USER_TO_DIS || die “” 0
done

# check to be sure that the person has an account on the local machine
egrep -s “^${USER_TO_DIS}:” /etc/passwd >/dev/null
case $? in
0)
echo “Disabling from password file”

lockit passwd.lock

egrep -v “^${USER_TO_DIS}:” /tmp/passwd.tmp
egrep “^${USER_TO_DIS}:” /etc/passwd | \
awk -F: ‘{print $1 “:*DISABLED*:” $3 “:” $4 “:” $5 “:” $6 “:” $7}’ >>/tmp/passwd.tmp

ed /tmp/passwd.tmp < s/^${USER_TO_DIS}:/X${USER_TO_DIS}:/p
w
q
EOF

cmp /etc/passwd /tmp/passwd.tmp >/dev/null
case $? in
0) rm /tmp/passwd.tmp ;;
*)
mv /tmp/passwd.tmp /etc/passwd
;;
esac
chmod a-w /etc/passwd
chmod a+r /etc/passwd
unlockit passwd.lock
;;
1)
echo “$PGM: $USER_TO_DIS Does not have an account on $HOST”
;;
esac

egrep -s “[:,]${USER_TO_DIS}$|[:,]${USER_TO_DIS},” /etc/group >/dev/null
case $? in
0)
echo “Disabling from group file”

lockit group.lock

sed -e “s/\([:,]\)${USER_TO_DIS},/\1X${USER_TO_DIS},/” \
-e “s/\([:,]\)${USER_TO_DIS}$/\1X${USER_TO_DIS}/” \
/tmp/group.tmp

cmp /etc/group /tmp/group.tmp >/dev/null
case $? in
0) rm /tmp/group.tmp ;;
*)
mv /tmp/group.tmp /etc/group
#/etc/dist/bin/mail-group
;;
esac
chmod a-w /etc/group
chmod a+r /etc/group
unlockit group.lock
;;
1)
echo “$PGM: $USER_TO_DIS Does not have a group entry on $HOST”
;;
esac

# remove any left over mail spool file
rm -f /var/mail/${USER_TO_DIS}

# insure log directory exists
test -d $LOGDIR || mkdir -p $LOGDIR
LOGFILE=$LOGDIR/$DATESTAMP

# log what we do
echo “$TIMESTAMP-$ME $USER_TO_DIS” >>$LOGFILE

exit
else
echo “Only root may run $PGM”
exit 2
fi

Please any feedback is quite helpful, and any input to make the script better is obviously welcomed. Later I’ll post up some stuff for quarterly changes, enabling disabled users, and a few other things I’ve been putting together lately. Hope this series will be helpful.

Tags: , , ,

Renaming a Logical Volume (how to rename)

Wednesday, October 29th, 2008 | Techie | No Comments

Today I was asked to rename a logical volume (something I hadn’t done before, but figured it was quite easy). Here’s what I ran:

lvm help

Which showed me the option of:

lvrename Rename a logical volume

Ah.. I thought to myself, this should be easy enough. So I did a quick poke at the man pages of lvmrename which netted me

lvrename [-A|--autobackup {y|n}] [-d|--debug] [-f|--force] [-h|--help] [-t|--test] [-v|--verbose] [--version]
VolumeGroupName OldLogicalVolumeName NewLogicalVolumeName

note: ugggg sorry for the formatting.. thank you wordpress.

So off I went, and here’s what I did:

sudo umount /mountpoint
sudo lvrename /dev/volgroupname/lgvold /dev/volgroupname/lgvnew
sudo vi /etc/fstab
fixed the required fstab settings
sudo mount -a (or you can mount each one individually, but in my situation I was able to just run umouna -a).

That’s it. Simple as that.

If you do happen to rename while mounted you’ll not be able to unmount. In that case just change to the new location in fstab and bounce the box (yes, that’s the easiest way.. sinec the device will keep showing busy, even though lsof and everything reports it shouldn’t be).

That’s it.. hope someone finds this helpful.

Tags: , ,

Switching from Windows to Linux, what you need to know

Monday, October 20th, 2008 | Fedora Core, Microsoft, SuSE Linux, Techie, Ubuntu / Kubuntu | 4 Comments

Switching from Windows to Linux and what you need to know:

Since we are in touch economic times the most important question is “How much will this cost me”? The answer is nothing, zero, zilch or nada. Whatever phrase you want to use (unless you’re really a stickler and want to divide your monthly Internet bandwidth cost against the time it took you to download the application and (well, you get the point). Hell, I would go on the edge and say it may actually save you money. How? You’ll be in touch with your computer, you’ll be excited to learn do stuff on it again, you’ll be heading the charge with changing the way a Corporate giant in Microsoft does it’s daily business, you’ll be FREE. (Man.. too much braveheart lately).

What is linux?
In the past years the phrase Linux has been mis-represented as a full blown distribution and not it’s original meaning. Linux, actually derived from the “Linux Kernel”, which was originally written by Linus Torvald in the early 90’s. So it is important to not refer a distribution as Linux, but as a Linux Distribution.

What is a distribution (distro)?
A distribution such as openSUSE (SUSE), Ubuntu, Fedora, PCLinuxOS, and Mandriva are all contain the basic Linux Kernel, and a bundle of applications which would provide your X support (GUI, Graphic User Interface), your Desktop Environment (Gnome / KDE / XFCE etc), and all your other basic and advanced functions. The major differences between distributions is their packages of choice (.deb (Debian, .rpm (RedHat package manager)), what packages come included with the distribution, and their management interfaces. The confusion of the many distributions may be one of the factors that turn people off of Linux, as they view it as “too confusing”.

What distribution is best?
This would be impossible for me to get up and say “Here is the best distribution for everyone”. Ever distribution has their good and their bad points, and each distribution does something better then the other. I personally use openSUSE, which is supported by Novell. I originally converted from Fedora Core (around the 4 days) to SuSE because the robustness of the distribution, and the choices it has always given. With that said, other popular distributions are Ubuntu, Fedora, Mandriva, Gentoo, Linux Mint, PCLinuxOS, and for historical reasons Slackware (one of the original distributions).

Can I still run my .exe programs?
The quick answer is no, but the more in-depth answer would be yes. Out of the box, the Linux Operating System does not allow you to run .exe binaries (which are Windows Binaries). However, there is a project called Wine (which Google has been great at helping advance) which allows us to install some Windows Applications and run some of these binaries. However, support for everything is not in place, and would be a per application basis.

What is a Desktop Environment?
I touched earlier in “What is a distribution” about Desktop Environments (typically referred to as DE). A DE is a an environment which consists of what most consider their “Desktop” and is comparable to what we see when we log onto a Windows workstation / server. These DE’s consist of our icons, wallpapers, folders, windows, taskbars etc. This is our functional GUI which runs off of the X system. The chosen DE is another thing that may separate one distribution from another.

What is the best Desktop Environment?
Much like Distributions. This is a hot topic especially between the 2 major DE’s Gnome and KDE. Another major player in the DE environment is XFCE, and a up and comer is called Enlightenment. The only thing I am going to say about these to not spark any type of debate is to try them all yourself to see which fits your need best. I personally find KDE 3.5.10 to be the sweet spot for me. KDE 3.5.10 is being replaced by KDE 4.X, but for my uses (every day production use at work) I find that KDE4 has not yet filled all the features in KDE 3.5 that I use. GNOME however is very popular in the enterprise work force, as it’s very easy to navigate (although I find KDE to be a friendly swap for you Windows users reading this).

Ok, now that you know what the Linux Kernel, Linux Distributions, and Desktop Environments are we’ll get down to the part where we replace Windows with Linux.

Here are some general uses for Windows users in the home space. After this we will go into what
you’re used to in each version of Windows, and try to compare it to Linux.

General uses:
Web Browsing: Some Windows applications for this task are: Internet Explorer, and Firefox comparable Linux applications that can do these tasks are Firefox (look familiar?), Opera (many more). For most home users, we use our computer as a way to browse the World Wide Web. A computer running a Linux OS, would be the perfect replacement, if this is your main need. Why you may wonder? Because a computer running a Linux OS is less susceptible to getting Malware / Viruses / Spam / Popups. This helps save the data on your machine, the personal data you type in at a web site, and in many other ways. I could write a million reasons here, but if you use your computer for only the internet, you should highly consider trying Linux, to save you heartaches with Viruses, etc in the future.

Word processing: Some Windows applications for this task are: Works, Word and openoffice, the major comparable Linux application is openoffice (again notice a trend? What is on Windows, may already be on Linux). If you run openoffice on Windows, a switch to Linux would a simple. You’re not doing anything different and using the same applications? So why the hesitation?

Spreadsheets: Some Windows applications for this task are: Works, Excel and openoffice, the major comparable Linux application is openoffice (again notice a trend? What is on Windows, may already be on Linux). See Word processing.

Email: You are just doing mail via the web (ie Gmail, Yahoo! Mail, Hotmail etc) then this does not actually refer to you, as that is considered “Web browsing”, and you should re-read the security implications I’ve mentions in Web browsing. If you use a client like outlook, you have 2 major replacements in Kmail (which ships with KDE), and Evolution (which ships with GNOME). If you are pulling from a Exchange Server, I would recommend Evolution (which could actually run on KDE (gotta love the flexability of Linux).

Multimedia: Some applications for these tasks are: iTunes, Windows Media Player, etc. The applications that would replace these in Linux are actually way better then both the applications mentioned for Windows. These applications are Amarok, Mplayer and VLC. I won’t get into the gists of why they are better, just know that they are in every way. Note with Mplayer and VLC, you can run nearly any format including formats that are for “Windows (yes, some video formats are actually Windows only). Also for DVD playback you can install libdvdcss (which is kind of a touch subject due to it’s legality in the US, I recommend checking it out, and fighting for the cause).

Ok.. off the high horse now, and on to migrating from Windows to Linux and what you can expect.

The Windows Vista user:
So there you are, with your new Windows Vista box, super excited because you now have something called Aero. You’ve been awiting years (about 5) to come out with something other then Windows XP, and now you got it an annoying thing that pops up every time you want to do something (User Access Control/UAC), and a kick ass way to switch between applications. You’re living in a euphoric stage until you find out that Linux did that before Vista was out, and can do about 90 even cooler functions. This is courtesy of Compiz/Comiz-Fusion. If you’ve seen someone with a modern Linux distribution, then you’ve undoubtedly been awed by their 3-D Desktop, and the different methods of seeing what applications are open. So you wonder, how can I get that? Easily, just install a new version of a major distribution. Yes, most major distributions ship with Compiz enabled by default. That means these awesome features right out of the box. You can enable them, and disable them by running their configuration manager (won’t get into detail here, but there is plenty out there to get you started). Now that I’ve broken your heart, and kicked you while you waited 5 years for the new version of Windows, I’ll let you know what to expect when you switch from the most prevalent Windows Operating System out there, Windows XP. (Vista users should also read the XP section).

The Windows XP user:
When you hear Linux many of you off the bat thing “It’s better, it’s this, it’s that”. I do agree with you on that front, but it is not without a learning curve, or without a possible headache or 2. Do you remember all the major headaches while learning Windows for the first time? All the crashes etc? Think of those headaches minimized by 85%. If you’re then willing to take the adventure, and going in with the mind set that there will be a learning curve, that may introduce some headaches, then please read on.

When you install, you’ll notice that the installation is very straight forward, very manager based and just as easy if not easier then a Windows XP installation. Once installed, and logged in you’ll notice that you won’t have to install tons of different applications (ie Office etc) as most packages ship with the distribution. You may or may not see an increase of speed (if you have a 3 / 5 year old installation of Windows XP then heck yeah, you’ll notice a speed increase). If you are a basic user, here you’ll notice no difference, other then the lack of Administrative privileges. These are not given to users, as it introduces un-needed security risks (we’re all just used to running as “Administrators” in Windows). To run something with elevated privileges we use sudo, but again this will only need to be done with certain administrative tasks, and most needs will prompt you for your or your root (or administrator in windows) password.

That’s it.. If you’re a regular user, that is all you’ll notice (if you even notice that). As a power user, or someone that like to tinker, you’ll notice that there is no registry, you’ll also notice you have the ability to modify a lot more, and have the freedom to do anything to your machine (include break it, which you power users will probably do while you’re in your “learning phase”, with power comes problems for us curious ones).

Sorry this is all over the place, I hope someone finds it useful, feel free to leave me a comment, and i’ll add to it. Thanks a ton.

Great external links:
openSUSE
Ubuntu
Mandriva
KDE
Gnome
openoffice

Here’s a great list of comparisons between Linux and Windows also (man, if I knew this existed before hand, I would have just linked this instead of writing everything out).
Wikipedia Comparison of Windows


Tags: , , ,

Resizing Logical Volume (LVM) on ext3

Sunday, October 19th, 2008 | Techie | 1 Comment

I’ve recieved a few emails from people asking “How can I resize an LVM (proper term would be resizing a Logical Volume) on their system”.

In this posting i’ll touch on only ext3 since that’s the default fs. Later, I’ll touch others if it’s requested.

There are a few steps you have to take to resize a partition. First, you have to resize the filesystem (be sure to do this before you reduce the lv, as that could cause data loss).

In this instance i’ll be resizing a mount location at /app. If you want to shrink the /home partition make sure you go into runlvl 3 (sudo init 3) and get out of the /home directory (cd /).

To resize the filesystem lets unmount it by running:

sudo umount /apps

First run a check on the file system:

sudo fs2chk -f /dev/volumegroup/logicalvolume

note: you can find the volume group name, or logical volume name you can use vgscan and lvscan (both are located in /sbin/)

Now lets resize the ext3 partition:

sudo resize2fs /dev/volumegroup/logicalvolume 10G

note: 10G is the NEW size that you want it to be

Once those are completed, you can finally resize the Logical Volume (isn’t this what we wanted in the first place?), to do this do:

sudo lvreduce -L 10G /dev/volumegroup/logicalvolume

note: Use the same output you defined in the resize2fs command.

Lets remount our partition and jump for joy:

sudo mount /dev/volumegroup/logicalvolume /app

note: If this mount point is defined in /etc/fstab, you can remount via sudo mount -a (this will mount everything in /etc/fstab).

Bonus:
If you wanted this space for an existing logical volume, you can run lvextend -L XXG /dev/volumegroup/logicalvolume.
Note: XX is the space you took away from the other reduced partition.


Tags: , ,

Flash not working with Firefox openSUSE 11.0

Thursday, July 10th, 2008 | SuSE Linux, Techie | 4 Comments

Have you install the Flash package from Adobe (10.0.0 Beta) and you lost your flash capabilities with firefox?

No worries it is easily fixed. Just run:

sudo ln -s /usr/lib/flash-plugin/libflashplayer.so /usr/lib/browser-plugins/libflashplayer.so

Close firefox (if open) then re-open and you’re golden.

Enjoy.. like always.. Hope someone finds it helpful

Tags: , ,

Installing NVIDIA Drivers on openSUSE 11.0 & other Linux Distrubutions

Saturday, June 7th, 2008 | Fedora Core, SuSE Linux, Techie, Ubuntu / Kubuntu | 7 Comments

You listened to many Graphics Card critics and went with an NVIDIA card for your Linux box. But just slapping the card in your machine or installing openSUSE 11.0 will not get you to fully utilize your card. Why? By default most distributions will setup your card using the nv driver which is included in the Xorg installation. So we need to download and install the nvidia driver from nvidia.com.

Now onto my installation. I downloaded the 173.08 Beta version (as I had some issues with the 173.14.05 driver (and when I did get it working it didn’t benchmark to the level the 173 driver did), so I am going to stay with the beta driver for now.

Download the appropriate driver x86 or x64

Switch to runlevel 3 (or init 3) you can do this by running init 3 as root.

Log into runlevel 3 and install the driver
sudo sh NVIDIA-Linux-x86-173.08-pkg1.run

Follow the onscreen instructions (really straight forward) and when done switch back to runlevel 5 by running init 5 as root.

Note: You will need the build packages. (ie gcc, kernel-source etc).

This works just fine across distributions like Fedora Core 9, Ubuntu, etc.

UPDATE: There is now a repository you can add for the NVIDIA Drivers. You can setup the repo by running:

sudo zypper ar ftp://download.nvidia.com/opensuse/11.0/ “Nvidia Driver”

Go into YaST –> Software Manager and install the driver that matches your running Kernel.

Tags: , , ,

Password protecting website without using .htaccess

Thursday, May 22nd, 2008 | SuSE Linux, Techie, Ubuntu / Kubuntu | 1 Comment

Do you host your own website and since you have control of the /etc/apache2/conf.d directory you would rather not enable .htaccess usage?

Now you wonder how do I password protect a directory without having a .htaccess file in the directory. You actually use the same options etc you would use in a .htaccess.  So here is a sample configuration file which requires authentication for the directory /var/www/stats

Here is the location of the file below:
/etc/apache2/conf.d

<Directory /var/www/stats>
AuthType Basic
AuthName “Statistic Tracker”
AuthUserFile /etc/apache2/htpasswd.setup
Require valid-user
</Directory>

To create the required htpasswd file (with the name above) do:
sudo htpasswd -c /etc/apache2/htpasswd.setup username

Now you will have to reset apache:
sudo /etc/init.d/apache2 restart

I will be adding this to my Wiki later

Tags: , , , ,

Search

Polls

Do you think having RDP on a Linux Host important in the enterprise space?

View Results

Loading ... Loading ...

Powered by