Category Archives: Linux

Migrating a RedHat users file to FreeBSD/OpenBSD

First, figure out if your Linux password file is shadowed or not. If it is, install John the Ripper from packages or ports (security/john) and use the unshadow utility that comes with it to merge your passwd and shadow files into one Sixth Edition-style file.

Using your Linux password file, we’ll call it linux_passwd, you need to add in ::0:0 between fields four and seven. awk(1) does this for you.

At this point, you want to edit the new_passwd file and remove the root and other system entries that are already present in your OpenBSD password file or aren’t applicable with OpenBSD (all of them). Also, make sure there are no duplicate usernames or user IDs between new_passwd and your OpenBSD box’s /etc/passwd. The easiest way to do this is to start with a fresh /etc/passwd

The last step, pwd_mkdb is necessary to rebuild the /etc/spwd.db and /etc/pwd.db files. It also creates a Sixth Edition-style password file (minus encrypted passwords) at /etc/passwd for programs which use it. OpenBSD uses a stronger encryption for passwords, blowfish, which is very unlikely to be found on any system which uses full Sixth Edition-style password files. To switch over to this stronger encryption, simply have the users run ‘passwd’ and change their password. The new password they enter will be encrypted with your default setting (usually blowfish unless you’ve edited /etc/login.conf). Or, as root, you can run passwd username.

Also you will want to copy over the groups file. note again, only copy over groups that do not exist in both.

Installing VMware Server on Ubuntu 8.04 Hardy Heron

I found a great post at MakeTechEasier I changed it a little and posted it.

You will be building kernel specific files so you need to have the proper header files installed for your kernel along with something to compile it.

If you are using 64 bits system, you have to install 32bit compatibility files

Download VMware Server 1.0.6

Download the patch file vmware-any-any-update-116.tgz

Extract the downloaded files

Run the VMware Server installer

You will be prompted to answer some questions. Press Enter to select the default answer. When it reaches the point that requires you to run, type No. The installer will exit. Next, apply the patch

This time, press Enter for all the questions and enter Yes to run the Once it has finished compiling, you should now see the VMware console in your Applications->Other. The first time you run vmware use the console by typing vmware in the terminal. If there are any errors it will tell us. If it says it can’t find some files all we need to do is copy them from the /usr/lib directory.

For 64 bit users

That’s it. Your VMware Server should be working now.

Realtek ALC888 and Ubuntu Hardy Heron low audio problem

Last night I installed Ubuntu 8.04 and I’m so impressed. I did the WbUI version. And let me tell you, It was the easiest OS install I have ever done. Everything is great only one problem. My audio was really quiet. I have an Realtek ALC888 chipset. I had to crank my speakers to get a descent volume.

I found a solution.

Even through I have my speakers plugged into the ‘Green’ standard front channel jack Ubuntu thinks it’s plugged into the side channel.

  1.  Open up the ALSA mixer[double click on the speaker at the top by the time]
  2. Click on Edit->Preferences
  3. Check all of the output channels
  4. Turn the volume up on all the devices till you find the right channel(be careful if you have your speakers still cranked or you’ll soil yourself)

Thats it. Easy.

Using rsync over ssh simple command

arguments used:

-a, –archive
This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything (with -H being a notable omission). The only exception to the above equivalence is when –files-from is specified, in which case -r is not implied.
-v, –verbose
This option increases the amount of information you are given during the transfer. By default, rsync works silently. A single -v will give you information about what files are being transferred and a brief summary at the end. Two -v flags will give you information on what files are being skipped and slightly more information at the end. More than two -v flags should only be used if you are debugging rsync.
Note that the names of the transferred files that are output are done using a default –out-format of “%n%L”, which tells you just the name of the file and, if the item is a link, where it points. At the single -v level of verbosity, this does not mention when a file gets its attributes changed. If you ask for an itemized list of changed attributes (either –itemize-changes or adding “%i” to the –out-format setting), the output (on the client) increases to mention all items that are changed in any way. See the –out-format option for more details.
-z, –compress
With this option, rsync compresses the file data as it is sent to the destination machine, which reduces the amount of data being transmitted — something that is useful over a slow connection.
Note that this option typically achieves better compression ratios than can be achieved by using a compressing remote shell or a compressing transport because it takes advantage of the implicit information in the matching data blocks that are not explicitly sent over the connection.
Note that -a does not preserve hardlinks, because finding multiply-linked files is expensive. You must separately specify -H.
-e, –rsh=COMMAND
This option allows you to choose an alternative remote shell program to use for communication between the local and remote copies of rsync. Typically, rsync is configured to use ssh by default, but you may prefer to use rsh on a local network.

Installing proprietary Nvidia drivers on Ubuntu Feisty Fawn

After problems on multiple machines I finally got nvidia binary drivers to work. I kept getting an error that the kernel module did not match the driver version and vice versa. Finally figured it out by searching on the net here’s my findings.

This procedure might work on other versions of Ubuntu but I don’t have those to test.

The instructions that nvidia gives with it’s binary are as generic as can be. This is a major problem for anyone who has installed the restricted drivers that are shipped with Ubuntu. If yer like me I always want the latest video drivers and you may run into some problems with that.

all the commands we will use will require root access we’ll have to use sudo. To make it easier we’ll issue sudo -s so we don’t have to use sudo in front of every command.

We first have to make sure we have the development packages with the linux headers and xorg dev installed.

Make sure we do not have any old drivers installed.

There are some files that might be left behind that will need removing
rm /etc/init.d/nvidia-glx
rm /etc/init.d/nvidia-kernel

Additionally, delete the following file if it exists:

now just install the new drivers

Follow the instructions and everything should be good.

Installing Ubuntu Studio theme on existing Ubuntu Feisty installation

Couldn’t be simpler