Mailbag

This month's answers created by:

[ Ben Okopnik, Faber Fedor, Kapil Hari Paranjape, Minh Van Nguyen, Rick Moen, Thomas Adam ]
...and you, our readers!

CTX Ez Book 800 Series (model FT6730)

C.O. Vimmerstedt [COV at ameritech.net]


Mon, 5 Nov 2007 12:03:30 -0500

I'm trying to change the CMOS battery in the above old notebook that I use with my ham radio station (old is good around a lot of RF). Does anyone know the secret to getting this thing apart? It seems to be held somehow in the middle under the lower keyboard.

Chuck



problem in coding of problem in linux

Smit Jadhav [smitjadhav19 at gmail.com]


Tue, 27 Nov 2007 19:32:35 +0530

i m student in computer science . i m doing a project in linux about security systems my concept is when a user tries to open a proteected file or folder he must be redirected to a other file or folder specified by us their is some sort of linking have to be done but how i dont know pls send any help message on my email id smit_jadhav19@yahoo.comor smitjadhav19@gmail.com


Kapil Hari Paranjape [kapil at imsc.res.in]


Wed, 28 Nov 2007 08:42:10 +0530

Hello,

On Tue, 27 Nov 2007, Smit Jadhav wrote:

> i m student in computer science . i m doing a project in linux about
> security systems
> my concept is when a user tries to open a proteected file or folder he must
> be redirected to a other file or folder specified by us
> their is some sort of linking have to be done but how i dont know pls send
> any help message on my email id

One way this can be done is to preload an alternative to the "open" file system call.

Another way is to create a new file-system kernel module which implements the appropriate open call for files within that particular file-system.

The "union" file-system concept is that if a file cannot/should not be written to then a copy of this file is created in another location and this copy is written to. This has been implemented in both the above ways.

The "cowdancer" Debian package implements the "preload" way.

The "aufs" and "unionfs" kernel modules implements it the file-system way.

All three programs are available under FOSS licenses. May the source be with you!

Kapil. --



apt-get dist-upgrade

Christopher Cole [freedomfixer at hotmail.com]


Sat, 3 Nov 2007 22:04:59 +0000

Hi there,

I'm looking for info on how to fix my login after performing dist-upgrade. I'm running Deb. Etch. I can sign on a root via term.

However I get errors like...

Could not open Network Socket, make sure dcopserver is running. And this one....

Could not start kstartupconfig. check your installation. When signing onto my user account.

I opened Kuser and crated a new login and that works. But I'd like to fix my old one.

Thanks, Christopher Cole


Ben Okopnik [ben at linuxgazette.net]


Sun, 4 Nov 2007 08:40:20 -0500

On Sat, Nov 03, 2007 at 10:04:59PM +0000, Christopher Cole wrote:

> 
> Hi there,
> 
> I'm looking for info on how to fix my login after performing dist-upgrade.
> I'm running Deb. Etch. I can sign on a root via term. 
> 
> However I get errors like...
> 
> Could not open Network Socket, make sure dcopserver is running. And this one....
> 
> Could not start kstartupconfig. check your installation. When signing onto my user account.

It sounds like something in KDE broke when you updated it - or you may be trying to run something (maybe in your .bash_profile?) that worked with the old KDE version but fails with the new one. Hard to say, without a whole lot more info.

> I opened Kuser and crated a new login and that works. But I'd like to fix my old one.

I'm not sure of what you mean here. If creating a new account works, then just remove the old one (make sure you don't delete your home directory, of course) and recreate it. Based on your description, that should fix the problem.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Chris Bannister [mockingbird at earthlight.co.nz]


Mon, 5 Nov 2007 04:55:25 -0500

On Sat, Nov 03, 2007 at 10:04:59PM +0000, Christopher Cole wrote:

> 
> Hi there,

Hi Chris,

> I'm looking for info on how to fix my login after performing dist-upgrade.

How did you "perform" the dist-upgrade?

> I'm running Deb. Etch. I can sign on a root via term. 

via an xterm?

> However I get errors like...
> 
> Could not open Network Socket, make sure dcopserver is running. And this one....

Could you please give the commands you typed and the errors which were returned for each command. It is difficult to know where the problem is if the exact error is not known.

-- 
Chris.
======


compressed issues of LG

Minh Nguyen [nguyenminh2 at gmail.com]


Fri, 2 Nov 2007 14:13:10 +1100

So far, issues of LG have been compressed using tar and gzip. Is there any intention to use tar with bzip2 for future issues? Since most of the files in each issue are text files, bzip2 is more efficient (in terms of the size of the compressed file) than gzip. Here is a comparison of bzip2 and gzip using the current issue; i.e. November 2007 (#144):

1028042 lg-144.tar.bz2
1045337 lg-144.tar.gz
IMHO, providing a bzip2 compressed format of LG issues would save some download time.

Regards

Minh Van Nguyen


Ramon van Alteren [ramon at forgottenland.net]


Fri, 02 Nov 2007 09:41:34 +0100

Minh Nguyen wrote:

> So far, issues of LG have been compressed using tar and gzip. Is there
> any intention to use tar with bzip2 for future issues? Since most of
> the files in each issue are text files, bzip2 is more efficient (in
> terms of the size of the compressed file) than gzip. Here is a
> comparison of bzip2 and gzip using the current issue; i.e. November
> 2007 (#144):
>
> 1028042 lg-144.tar.bz2
> 1045337 lg-144.tar.gz

That is a 1% size decrease.

Best regards,

Ramon


Ben Okopnik [ben at linuxgazette.net]


Fri, 2 Nov 2007 09:02:47 -0400

On Fri, Nov 02, 2007 at 02:13:10PM +1100, Minh Nguyen wrote:

> So far, issues of LG have been compressed using tar and gzip. Is there
> any intention to use tar with bzip2 for future issues? Since most of
> the files in each issue are text files, bzip2 is more efficient (in
> terms of the size of the compressed file) than gzip. Here is a
> comparison of bzip2 and gzip using the current issue; i.e. November
> 2007 (#144):
> 
> 1028042 lg-144.tar.bz2
> 1045337 lg-144.tar.gz
> 
> IMHO, providing a bzip2 compressed format of LG issues would save some
> download time.

As I recall, we had a similar discussion here in TAG quite a while back (digging through my 'Sent_mail' says 2002 - but I can't find it in LG. Annoying, that.) In any case, here's the comparison that I ran then:

	OK, I'm the curious type... Here's a bunch of files from many walks of
	life; let's see who does what.
 	
	-rw-r--r--    1 ben      ben       1474560 May 20 05:51 test.bin
	-rw-rw-r--    1 ben      ben        102970 Sep 19  2000 test.bmp
	-rw-rw-r--    1 ben      ben        121880 Sep 19  2000 test.gif
	-rw-rw----    1 ben      ben        939783 Jun 17 15:29 test.jpg
	-rw-r--r--    1 ben      ben       1727320 Oct  6 15:51 test.mov
	-rw-r--r--    1 ben      ben       1048576 Oct 16 20:59 test.nulls
	-rw-r--r--    1 ben      ben       1048576 Oct 16 21:03 test.ones
	-rw-r--r--    1 ben      ben        490765 Sep  1  2001 test.pbm
	-rw-r--r--    1 ben      ben        197029 Oct 12 13:53 test.ps
	-rw-rw-r--    1 ben      ben       1995119 May 29  2001 test.txt
	-rw-r--r--    1 ben      ben      36354922 Oct 16 20:29 test.wav
 	
	# So then, I was like, "Dude, check out some of this stuff:"
 	
	rar a ../rar.rar *      # Very slow
	zip ../zip.zip *
	tar czf ../tgz.tgz *    # Uses gzip as compressor
	tar cjf ../tbz2.tbz2 *  # Uses bz2 as compressor, slowest of all
	tar cf -|compress - 
 	
	# And the winnah and champeen is...
 	
	-rw-r--r--    1 ben      ben      26653542 Oct 16 21:09 rar.rar
	-rw-r--r--    1 ben      ben      33171830 Oct 16 21:26 tbz2.tbz2
	-rw-r--r--    1 ben      ben      36128937 Oct 16 21:10 zip.zip
	-rw-r--r--    1 ben      ben      36132733 Oct 16 21:14 tgz.tgz
	-rw-r--r--    1 ben      ben      43458125 Oct 16 21:21 Z.Z
	
	I'll be darned. Looks like "rar" is it. Whodathunk? 
Unfortunately, the only method that shows an appreciable savings in size - 'rar', that is - uses a proprietary algorithm.

Given that there's no appreciable gain to be had by changing - and that a change may occasion problems (e.g., it would break any automated scripts that download and decompress the monthly archives), I don't see it changing any time soon. I'm usually pretty reluctant to change things like this without a really compelling reason.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Kapil Hari Paranjape [kapil at imsc.res.in]


Fri, 2 Nov 2007 19:54:17 +0530

Hello,

On Fri, 02 Nov 2007, Ben Okopnik wrote:

> 	# And the winnah and champeen is...
> 	
> 	-rw-r--r--    1 ben      ben      26653542 Oct 16 21:09 rar.rar
> 	-rw-r--r--    1 ben      ben      33171830 Oct 16 21:26 tbz2.tbz2
> 	-rw-r--r--    1 ben      ben      36128937 Oct 16 21:10 zip.zip
> 	-rw-r--r--    1 ben      ben      36132733 Oct 16 21:14 tgz.tgz
> 	-rw-r--r--    1 ben      ben      43458125 Oct 16 21:21 Z.Z
> 	
> 	I'll be darned. Looks like "rar" is it. Whodathunk? 

You should've tried "7zip".

Regards,

Kapil. --


Breen Mullins [breen.mullins at gmail.com]


Fri, 2 Nov 2007 07:58:58 -0700

* Kapil Hari Paranjape <kapil@imsc.res.in> [2007-11-02 19:54 +0530]:

>
>You should've tried "7zip". 
>
That would've been quite a trick in 2002...

Breen

-- 
Breen Mullins
Menlo Park, California

Ben Okopnik [ben at linuxgazette.net]


Fri, 2 Nov 2007 11:09:00 -0400

On Fri, Nov 02, 2007 at 07:58:58AM -0700, Breen Mullins wrote:

> * Kapil Hari Paranjape <kapil@imsc.res.in> [2007-11-02 19:54 +0530]:
> 
> >
> >You should've tried "7zip". 
> >
> That would've been quite a trick in 2002...

I was wondering about that. Like I said, I only heard about it much later - and it was being touted as a brand-new widget then.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Ben Okopnik [ben at linuxgazette.net]


Fri, 2 Nov 2007 11:08:06 -0400

On Fri, Nov 02, 2007 at 07:54:17PM +0530, Kapil Hari Paranjape wrote:

> Hello,
> 
> On Fri, 02 Nov 2007, Ben Okopnik wrote:
> > 	# And the winnah and champeen is...
> > 	
> > 	-rw-r--r--    1 ben      ben      26653542 Oct 16 21:09 rar.rar
> > 	-rw-r--r--    1 ben      ben      33171830 Oct 16 21:26 tbz2.tbz2
> > 	-rw-r--r--    1 ben      ben      36128937 Oct 16 21:10 zip.zip
> > 	-rw-r--r--    1 ben      ben      36132733 Oct 16 21:14 tgz.tgz
> > 	-rw-r--r--    1 ben      ben      43458125 Oct 16 21:21 Z.Z
> > 	
> > 	I'll be darned. Looks like "rar" is it. Whodathunk? 
> 
> You should've tried "7zip". 

I recall finding out about and playing with 7zip well after this discussion; I don't recall being particularly impressed with it one way or another. Looking at it now, one reason, at least, stands out:

 From the man page:
 Backup and limitations
       DO NOT USE the 7-zip format for backup purpose on Linux/Unix because :
        - 7-zip does not store the owner/group of the file.
Compression-wise, using my 'Sent_mail' archive (I've trimmed the output for readability):

ben@Tyr:/tmp/t$ time tar cvzf Sent_mail.tgz Sent_mail 
real    0m34.554s
ben@Tyr:/tmp/t$ time tar cvjf Sent_mail.tbz Sent_mail 
real    1m52.085s
ben@Tyr:/tmp/t$ time tar cvZf Sent_mail.tar.Z Sent_mail 
real    0m47.239s
ben@Tyr:/tmp/t$ time tar cvf - Sent_mail | 7zr a -si Sent_mail.7z
real    2m34.064s
ben@Tyr:/tmp/t$ ls -lS
total 551944
-rw-r--r-- 1 ben ben 162769893 2007-11-02 10:40 Sent_mail
-rw-r--r-- 1 ben ben 128435455 2007-11-02 10:56 Sent_mail.tar.Z
-rw-r--r-- 1 ben ben  96948867 2007-11-02 10:52 Sent_mail.tgz
-rw-r--r-- 1 ben ben  92754358 2007-11-02 10:54 Sent_mail.tbz
-rw-r--r-- 1 ben ben  83686986 2007-11-02 11:00 Sent_mail.7z
Yep, "7zip" is smallest (I don't have "rar" anymore; won't be using proprietary software for key LG functions anyway. :) It's also slowest, by a large margin. TANSTAAFL, I guess.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


How do I reformat an Ubuntu installation?

Derry [fajd at tpg.com.au]


Thu, 29 Nov 2007 23:05:29 +1100

I have SUSE 10 on my PC and installed Ubuntu which has partitioned my hard drive. I want to reformat the hard drive to allow a clean reinstall of Ubuntu 7.10 only from a desktop CD. I've tried using "fdisk" but get the error message "Unable to open /dev/hda" which suggests a problem somewhere, yet Ubuntu currently runs with out any problems. Do I continue with fdisk? If so, how? Or try something else? Once reformatting is successful, will the PC boot directly off the CD or do I need to make a boot disk of some kind? Many thanks for any tips.


Minh Nguyen [nguyenminh2 at gmail.com]


Thu, 29 Nov 2007 23:42:51 +1100

Derry,

[...]

> I've tried using "fdisk" but get the error message "Unable to open /dev/hda" which suggests a
> problem somewhere, yet Ubuntu currently runs with out any problems.

Is your master hard disk an IDE HDD or a SATA HDD? I've come across a similar problem when trying to install Slackware 12.0 on a PC. Then I realised that the PC's specifications contain a SATA HDD, so I used cfdisk to reformat /dev/sda, which was the master HDD.

> Do I continue with fdisk? If so, how? Or try something else? Once
> reformatting is successful, will the PC boot directly off the CD or do I
> need to make a boot disk of some kind? Many thanks for any tips.

I think Rick Moen has somewhat addressed this problem in this month's thread "uninstalling linux". His tip is to boot your PC with a live CD/DVD distribution, then execute the following command to reformat your hard disk:

dd if=/dev/zero of=/dev/sdXX bs=512 count=1
In the same thread, I also talked about using Knoppix to wipe out all partitions on an HDD. Just in case you haven't come across this tip, I've reproduced it below:

A "quick and dirty" way is to get yourself a copy of a Knoppix distribution. Perhaps from Knoppix 5.x onwards, maybe from 3.x onwards would also do the job. Here, I assume that you use Knoppix 5.0.1 or 5.1.1 CD/DVD distribution.

[1] Set up your BIOS to boot a CD/DVD drive first.

[2] Boot up the Knoppix live CD/DVD. This will take a while to load X and get you into KDE, a graphical session under Linux.

[3] Once KDE is ready to use, locate the "K" icon in the bottom-left corner of your screen. This is the menu for KDE, similar to the "Start" menu under Windows XP.

[4] Click on the K menu and locate "System". You need to be patient with live CD/DVD distributions, depending on your system's hardware specifications. Once the "System" menu pops up, click on a program called "QTParted". I think there are two icons for this tool within the "System" submenu:

1. QTParted (create, reorganize and remove partitions)
2. QTParted (QTParted)
You can choose either of these two programs.

[5] I assume that you're using IDE HDD(s) and IDE CD/DVD drive(s). Once QTParted is up, you need to familiarize yourself with the "Device" tree on the left side of the program window. If you have two IDE HDDs, then your master hard drive will be /dev/hda (this is also the case if you have only one IDE HDD), and your slave drive will be /dev/hdb. Your IDE CD/DVD drive(s) will be /dev/hdc for the master drive, and /dev/hdd for the slave drive.

[6] Familiarize yourself with /dev/hda and/or /dev/hdb, as the case may be. Note down the drive and/or partition(s) that you want to delete/wipe/format/reformat. Say you want to keep /dev/hda intact, but you want to wipe everything on /dev/hdb. Then on the "Device" tree, click on /dev/hdb. A visual representation of the drive should appear on the right side of your screen. This is similar to what you would get if you have ever format/reformat/defragment drives under Windows XP.

[7] Right click on any partition to get yourself familiar with the options for formatting, resizing or deleting partitions/drives.

[8] In your case, I assume that you want to delete all partitions on /dev/hda. In the "Device" tree, click on /dev/hda. Then right click on a partition and choose "Delete" to wipe it out. This won't actually wipe out the partition, yet, but just an indication that you want to wipe it. Do this for as many times as you have partitions. Once you're happy that all partitions have been marked for deletion, go to File -> Commit. Be cautious here; this will actually wipe out all partitions that you've marked for deletion.

[8] Once all partitions on /dev/hda have been wiped out, reboot your machine. If everything goes well, you should now be able to install/reinstall MS-Windows XP on /dev/hda.

Regards

Minh Van Nguyen


Minh Nguyen [nguyenminh2 at gmail.com]


Thu, 29 Nov 2007 23:51:51 +1100

Derry,

[...]

> [8] Once all partitions on /dev/hda have been wiped out, reboot your
> machine. If everything goes well, you should now be able to
> install/reinstall MS-Windows XP on /dev/hda.

[8] Correction: Once all partitions on /dev/hda have been wiped out, reboot your machine and do a fresh install from your distribution CD/DVD.

Regards

Minh Van Nguyen


Neil Youngman [Neil.Youngman at youngman.org.uk]


Thu, 29 Nov 2007 13:21:40 +0000

On Thursday 29 November 2007 12:05, Derry wrote:

> I have SUSE 10 on my PC and installed Ubuntu which has partitioned my
> hard drive. I want to reformat the hard drive to allow a clean reinstall
> of Ubuntu 7.10 only from a desktop CD. I've tried using "fdisk" but get
> the error message "Unable to open /dev/hda" which suggests a problem
> somewhere, yet Ubuntu currently runs with out any problems. Do I
> continue with fdisk? If so, how? Or try something else? Once
> reformatting is successful, will the PC boot directly off the CD or do I
> need to make a boot disk of some kind? Many thanks for any tips.

You could try booting the Ubuntu CD and see if the disk partitioning step offers an option to take over the whole disk. Most installers will repartition and reformat for you, but I'm not familiar with Ubuntu. The installation instructions should tell you.

Alternatively, if you have to wipe it beforehand, then when you're in linux try 'df -k' or just 'mount'. These will list your mounted filesystems. If the partitions start with /dev/sda then your hard disk is /dev/sda and you can reformat the disk using 'fdisk /dev/sda'.

Most PCs will boot directly off a CD, but you may need to alter the BIOS settings to allow it and/or to make it try the CD before trying to boot from the hard disk.

Neil


Minh Nguyen [nguyenminh2 at gmail.com]


Fri, 30 Nov 2007 00:53:42 +1100

Derry,

[...]

> You could try booting the Ubuntu CD and see if the disk partitioning step
> offers an option to take over the whole disk. Most installers will
> repartition and reformat for you, but I'm not familiar with Ubuntu. The
> installation instructions should tell you.

I'm talking about Ubuntu 6.10 here, but I think Ubuntu 7.10 is similar. Once you've booted into the default desktop session, locate an icon in the top left of your screen called "Install". You may find this icon underneath another icon named "Examples". Run the "Install" icon and carefully follow the instructions.

First you'll be presented with the "Welcome screen", followed by the "Where are you?" screen. Then you'll get the "Keyboard layout" screen, which is followed by the "Who are you?" screens. After that, you should be presented with the "Prepare disk space" screen. This screen presents you with three radio buttons; here's what they look like on my MacBook

1. Erase entire disk: SCSI1 (0,1,0) (sda) - 120.0 GB ATA TOSHIBA MK1234GS
2. Use the largest continuous free space
3. Manually edit partition table
But I think you can expect to see something similar to these three radio buttons. Radio button 1, the very top one, should allow you to automatically wipe out everything on your hard disk. Choose the top-most radio button and click "Forward". Carefully follow the instructions on the "Ready to install" screen. Once you're satisfied with your system's configurations, click "Install".

Regards

Minh Van Nguyen


Ben Okopnik [ben at linuxgazette.net]


Thu, 29 Nov 2007 12:55:36 -0500

On Thu, Nov 29, 2007 at 11:05:29PM +1100, Derry wrote:

> I have SUSE 10 on my PC and installed Ubuntu which has partitioned my
> hard drive. I want to reformat the hard drive to allow a clean reinstall
> of Ubuntu 7.10 only from a desktop CD. I've tried using "fdisk" but get
> the error message "Unable to open /dev/hda" which suggests a problem
> somewhere, yet Ubuntu currently runs with out any problems.

Unless you're root, you won't be able to use "fdisk" to change the HD via "fdisk". Try 'sudo fdisk /dev/hda'.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


NIS client root privilege

Smile Maker [britto_can at yahoo.com]


Tue, 6 Nov 2007 03:17:20 -0800 (PST)

Folks,

When I configure NIS client in Linux machines the client's roots are having exclusive access to the home directories by doing "su username "

Is there anyway to prevent that.

Thanks & regards, Britto


Mulyadi Santosa [mulyadi.santosa at gmail.com]


Tue, 06 Nov 2007 23:45:25 +0700

Hi...

> Folks,
>
>   When I configure NIS client in Linux machines the client's roots are having exclusive access to the home directories by doing  "su username " 
>
> Is there anyway to prevent that.
>
>   
Do you mean, let's say I am user A. When I do:
$ su B
I switch to B and have access to B's home directory?

If it's something like that, I need to know, what directories are exported to client? /home? /home/<user>? I guess you're exporting the hole /home?

regards,

Mulyadi


Jim Jackson [jj at franjam.org.uk]


Tue, 6 Nov 2007 22:21:55 +0000 (GMT)

On Tue, 6 Nov 2007, Smile Maker wrote:

> Folks,
>
>   When I configure NIS client in Linux machines the client's roots are
> having exclusive access to the home directories by doing "su username "
>
> Is there anyway to prevent that.

Do you mean NIS? Or do you mean NFS?

Jim


Smile Maker [britto_can at yahoo.com]


Tue, 6 Nov 2007 22:38:47 -0800 (PST)

It is on NIS.

In nis client root can do su - username

and access his files.


Faber J. Fedor [faber at linuxnj.com]


Wed, 7 Nov 2007 11:31:14 -0500

On 06/11/07 22:38 -0800, Smile Maker wrote:

> It is on NIS.
> 
> In nis client root can do su - username 
> 
> and access his files.

I don't think there is a way to stop that, other than not mounting the directories-that-shall-not-be-accessed.

-- 
 
Regards,
 
Faber Fedor
President
Linux New Jersey, Inc.
908-320-0357
800-706-0701

Karl-Heinz Herrmann [khh at khherrmann.de]


Wed, 7 Nov 2007 21:20:17 +0100

Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200) Status: O Content-Length: 1716 Lines: 41

On Tue, 6 Nov 2007 22:38:47 -0800 (PST) Smile Maker <britto_can@yahoo.com> wrote:

> In nis client root can do su - username 

That one of the major security problems if anybody besides trusted admins have root access anywhere with NFS shared files. You can switch off that root is allowed to su without password to a different user -- but then root can allow this again of course by changing the same config file.

The only way to give RESTRICTED root access (like apt-get ...) is setting up sudoers file so (specific) normal users may do CERTAIN things but definietly not everything (like sudo bash).

On the other hand with samba/cifs file it MIGHT be possible (not tested) to allow users to mount their particular part of home to a mount point they have access to (not all users to the same mountpoint) with authentification. Then local root might not be able to do so easily that much harm to other users. cifs is supposed to carry some unix attributes over samba shares, but I'm not quite sure yet what exactly and how to set this up with the proper fstab lines.

K.-H.



Some stunnel questions (hopefully not too dumb)

Harmon, Paul [paul.harmon at nscorp.com]


Thu, 29 Nov 2007 15:44:51 -0500

Hi All,

I'm trying to use Stunnel to create an encrypted tunnel into my LINUX box from another LINUX box and as much as I hate to admit it, I know relatively little about SSL implementation. I would like to set up connection from a relatively dumb test client application which requests of my test server to send out the contents of a file which I specify to it. This is done by firing up my server and having it listen to requests on specific port number which I have chosen, accept the connection and respond with the data over the socket. I have recently found Barry O'Donovan's article in the Linux Gazette which seems to specify how to set up Stunnel-4.XX to create an SSL aware server. That much seems reasonable. But my question is "How do I setup a similar scheme for the client?" I've found other articles, but they seem to be for older versions of Stunnel using flags that do not seem to apply to Stunnel-4.XX. So here I am with half the solution I need. Now what? Help!!!!

Many Thanks for serious replies,

Paul Harmon


Kapil Hari Paranjape [kapil at imsc.res.in]


Fri, 30 Nov 2007 09:57:06 +0530

Hello,

On Thu, 29 Nov 2007, Harmon, Paul wrote:

> But my question is "How do I setup a similar scheme for the client?"

I confess to not being a user of stunnel4 (even though I should be!). However, one need not actually do any "SSL-like" thing to connect to an SSL server which does not require clients to authenticate using SSL.

The option "client = yes" ought to do most of the work.

Next you need to decide on what port your stunnel will accept local connections (say this is 1234) and what port on the remote side you will connect (say this is 4321). You then put "local = 1234" and "connect = remotehost:4321".

Finally, you start stunnel and then point your non-SSL aware client to "127.0.0.1:1234".

To make the whole thing more SSL-like, there are two aspects:

	1. Client verifies the server if you use
		CAfile = certfile
        where you replace certfile with the name of a file
        containing the self-signed certificate of the CA of your
        server certificate (or enough CA's to verify this server
        sertificate).
 
	2. Server uses SSL to authenticate the client if you use
		key = keyfile
		cert = pemfile
	where you replace keyfile with the name of the file
	containing your SSL private key and pemfile with the name
	of a file containing the certificate for your key. This
	certificate must be signed by a CA whose certificate is in
	the CAfile of the server. (Chaining of certs is also
	possible).
Hope this helps,

Kapil. --


Kapil Hari Paranjape [kapil at imsc.res.in]


Fri, 30 Nov 2007 10:54:23 +0530

Hello,

On Fri, 30 Nov 2007, Kapil Hari Paranjape wrote:

> I confess to not being a user of stunnel4 (even though I should be!).
> However, one need not actually do any "SSL-like" thing to connect to
> an SSL server which does not require clients to authenticate using
> SSL.

This is with the (default) setting "verify = default" which does not do SSL verification, but see below.

> To make the whole thing more SSL-like, there are two aspects:

In addition to the settings given in my earlier mail you need to set "verify=2" or "verify=3".

Regards,

Kapil. --


Kapil Hari Paranjape [kapil at imsc.res.in]


Sat, 1 Dec 2007 08:34:39 +0530

Hello,

I have added TAG back to the lists of correspondents. Please do not respond privately to a mail sent to this list.

On Fri, 30 Nov 2007, Harmon, Paul wrote:

>         Thanks for the input Kapil. However, now I have a really dumb
> question: "On my server I obviously know the port number. Why do I need
> a port number on my client's local machine. When making connections on
> clients you simply issue a connect call and the port of the server is
> specified. There is no local port mentioned or is it because it is now
> treating Stunnel as its server now?"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You've got it. In more detail:

Stunnel(client) does not provide the client protocol it merely creates an encrypted tunnel which the client can use to communicate with the server. Now your local network client needs to connect to some network port in order to take its part in the protocol. Normally this would be "remotehost:port". In this case we want to tunnel it so it is "localhost:4321" which speaks to stunnel. Then stunnel(client) encrypts this and sends it to the stunnel(server) at "remotehost:1234" which in turn then passes it to the actual server listening on some local port.

So, yes, the stunnel(client) is acting as a local server which proxies the remote service.

I hope this clarifies things. (I may have mixed up 1234 and 4321 so that the above description may be at odds with the configs I gave).

Regards,

Kapil. --



Floppy Drive automounting ubuntu 7.04??

OSIDE [yaja at cox.net]


Fri, 2 Nov 2007 15:58:40 -0700

I have ubuntu 7.04 on a single user computer. New to ubuntu linux 0S & using the command line, trying to learn it. Need information on how to auto mount the platform device (floppy0) and the PC floppy drive. When I right click on floppy drive & click on mount, I get the error message, mount:/dev/fd0 is not a valid block device.


Ben Okopnik [ben at linuxgazette.net]


Fri, 2 Nov 2007 21:49:16 -0400

On Fri, Nov 02, 2007 at 03:58:40PM -0700, O'SIDE wrote:

>    *
>    I have ubuntu 7.04 on a single user computer. New to ubuntu linux 0S &
>    using the command line, trying to learn it. Need information on how to
>    auto mount the platform device (floppy0) and the PC floppy drive.  When I
>    right click on floppy drive & click on mount, I get the error message,
>    mount:/dev/fd0 is not a valid block device.

You may have a bad or unformatted floppy; that message often indicates one. If you believe that it's neither, try inserting it into the drive, then (without trying to mount it) check to see what it looks like to the system:

sudo file -s /dev/fd0
-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


uninstalling linux

sugar plum [sugarplum_lana at yahoo.com]


Wed, 21 Nov 2007 14:40:14 -0800 (PST)

So a friend of mine sends me a couple of hard drives for my birthday telling me one used to be a linux drive and that i will more than likely need to partition it. So i hook it up in my tower and turn the thing on. Here's what I see....

  [Linux-bzImage, setup=0x1e00, size=0x16eb71]
  initrd /initrd -2.6.15-1.2054_FC5.img
  [Linux-initrd @ 0xfd45000, 0x19adf9 bytes]
     
  Uncompressing Linux... ok, booting the kernel.
  Red Hat nash version 5.0.32 starting
  Reading all physical volumes. This may take a while...
  Couldn't find device with uuid 'tD0wBg-QBZz-zExm-A6QM-ZbPv-z42w-su5bzz'.
  Couldnt find all physical volumes for Volume Group VolGroup00.
  Couldn't find device with uuid 'tD0wBg-QBZz-zExm-A6QM-ZbPv-z42w-su5bzz'.
  Couldnt find all physical volumes for Volume Group VolGroup00.
  Couldn't find device with uuid 'tD0wBg-QBZz-zExm-A6QM-ZbPv-z42w-su5bzz'.
  Couldnt find all physical volumes for Volume Group VolGroup00.
  Couldn't find device with uuid 'tD0wBg-QBZz-zExm-A6QM-ZbPv-z42w-su5bzz'.
  Couldnt find all physical volumes for Volume Group VolGroup00.
  Unable to find volumegroup "VolGroup00"
  Unable to access resume device (idev/volgroup00/LogVol01)
  Mount: could not find file system '/dev/root'
  Setuproot: moving idev failed: no such file or directory.
  Setuproot: error mounting /proc: no such file or directory.
  Setuproot: error mounting /sys: no such file or directory.
  Switchroot: mount failed: no such file or directory
  Kernel Panic- not syncing: attempted to kill init!
All i want to know is step by step.. how do i make that go away so i can install Windows XP? *sighs softly* thanks for your time in advance

Sugar


Rick Moen [rick at linuxmafia.com]


Wed, 21 Nov 2007 15:26:17 -0800

Quoting sugar plum (sugarplum_lana@yahoo.com):

> All I want to know is step by step.. how do I make that go away so I
> can install Windows XP? *sighs softly* 

1. The very first Google hit on "remove Linux" is http://support.microsoft.com/kb/314458 , "How to Remove Linux and Install Windows XP". Article appears to be sufficient albeit grossly overcomplicated.

2. However, I would think it should suffice to just boot your MS-Windows XP installer from its CD or DVD or whatnot, and tell it to blow away whatever's on the target hard drive. I'm pretty sure that even XP can handle that extremely elementary installation task.

Basically, what you tried to do was boot the hard drive. As the old technical support joke goes, Don't Do That, Then.


Minh Nguyen [nguyenminh2 at gmail.com]


Thu, 22 Nov 2007 10:36:54 +1100

Rick,

[...]

> 2.  However, I would think it should suffice to just boot your
> MS-Windows XP installer from its CD or DVD or whatnot, and tell it to
> blow away whatever's on the target hard drive.  I'm pretty sure that
> even XP can handle that extremely elementary installation task.

If you're booting the MS-Windows XP installer CD/DVD, the installer program (Setup or whatnot) would (usually/often/always) hiccup if it finds that your master IDE HDD has a partition on it. Setup doesn't care what kind of partition, as long as there's a partition. Then you'd get the infamous BSOD, or your screen would just blank out.

Regards

Minh Van Nguyen


Rick Moen [rick at linuxmafia.com]


Wed, 21 Nov 2007 16:04:20 -0800

Quoting Minh Nguyen (nguyenminh2@gmail.com):

> If you're booting the MS-Windows XP installer CD/DVD, the installer
> program (Setup or whatnot) would (usually/often/always) hiccup if it
> finds that your master IDE HDD has a partition on it.

I actually checked using an XP installation CD and the ThinkPad T42p test machine in front of me, which has a bunch of Linux swap and ext3 filesystems on it. No such problem seen.

I did not proceed to actually wipe the drive, as I have uses for those filesystems, as yet.

FWIW, in the general case, I'd just keep a live CD around, boot it, and "dd if=/dev/zero of=/dev/sdXX bs=512 count=1". Clean, fast, foolproof. But the "I want to install XP" querent wouldn't want to hear that, so I didn't bother to tell him.


Minh Nguyen [nguyenminh2 at gmail.com]


Thu, 22 Nov 2007 11:24:14 +1100

Rick,

[...]

> I actually checked using an XP installation CD and the ThinkPad T42p
> test machine in front of me, which has a bunch of Linux swap and ext3
> filesystems on it.  No such problem seen.

When I said that Setup would hiccup, I have actually tried to boot the installer CD on a PC with two IDE HDDs and two IDE CD/DVD drives. The booting and installation processes didn't go smoothly, because /dev/hda wasn't a partition-free drive, meaning that there shouldn't be anything on it just like what you'd get when you purchase an IDE HDD. BTW, /dev/hdb wasn't connected to the motherboard when this was happening.

I then proceed to wipe everything on /dev/hda, and then run the installer CD again. This time, no BSOD and the installation went OK.

> I did not proceed to actually wipe the drive, as I have uses for those
> filesystems, as yet.

It works on my ThinkPad R40. But I'd need to download extra drivers to accelerate the GUI. I chose to install Slackware 12.0 instead.

> FWIW, in the general case, I'd just keep a live CD around, boot it, and
> "dd if=/dev/zero of=/dev/sdXX bs=512 count=1".  Clean, fast, foolproof.

You're right.

> But the "I want to install XP" querent wouldn't want to hear that, so I
> didn't bother to tell him.

Good thinking.

Regards

Minh Van Nguyen


Minh Nguyen [nguyenminh2 at gmail.com]


Thu, 22 Nov 2007 10:54:22 +1100

Sugar,

[...]

> All i want to know is step by step.. how do i make that go away so i can
> install Windows XP? *sighs softly*
> thanks for your time in advance

A "quick and dirty" way is to get yourself a copy of a Knoppix distribution. Perhaps from Knoppix 5.x onwards, maybe from 3.x onwards would also do the job. Here, I assume that you use Knoppix 5.0.1 or 5.1.1 CD/DVD distribution.

[1] Set up your BIOS to boot a CD/DVD drive first.

[2] Boot up the Knoppix live CD/DVD. This will take a while to load X and get you into KDE, a graphical session under Linux.

[3] Once KDE is ready to use, locate the "K" icon in the bottom-left corner of your screen. This is the menu for KDE, similar to the "Start" menu under Windows XP.

[4] Click on the K menu and locate "System". You need to be patient with live CD/DVD distributions, depending on your system's hardware specifications. Once the "System" menu pops up, click on a program called "QTParted". I think there are two icons for this tool within the "System" submenu:

1. QTParted (create, reorganize and remove partitions)
2. QTParted (QTParted)
You can choose either of these two programs.

[5] I assume that you're using IDE HDD(s) and IDE CD/DVD drive(s). Once QTParted is up, you need to familiarize yourself with the "Device" tree on the left side of the program window. If you have two IDE HDDs, then your master hard drive will be /dev/hda (this is also the case if you have only one IDE HDD), and your slave drive will be /dev/hdb. Your IDE CD/DVD drive(s) will be /dev/hdc for the master drive, and /dev/hdd for the slave drive.

[6] Familiarize yourself with /dev/hda and/or /dev/hdb, as the case may be. Note down the drive and/or partition(s) that you want to delete/wipe/format/reformat. Say you want to keep /dev/hda intact, but you want to wipe everything on /dev/hdb. Then on the "Device" tree, click on /dev/hdb. A visual representation of the drive should appear on the right side of your screen. This is similar to what you would get if you have ever format/reformat/defragment drives under Windows XP.

[7] Right click on any partition to get yourself familiar with the options for formatting, resizing or deleting partitions/drives.

[8] In your case, I assume that you want to delete all partitions on /dev/hda. In the "Device" tree, click on /dev/hda. Then right click on a partition and choose "Delete" to wipe it out. This won't actually wipe out the partition, yet, but just an indication that you want to wipe it. Do this for as many times as you have partitions. Once you're happy that all partitions have been marked for deletion, go to File -> Commit. Be cautious here; this will actually wipe out all partitions that you've marked for deletion.

[8] Once all partitions on /dev/hda have been wiped out, reboot your machine. If everything goes well, you should now be able to install/reinstall MS-Windows XP on /dev/hda.

Regards

Minh Van Nguyen



Run java class file using cron?

Mudassar Khan [mudassar at jumpgames.co.in]


Wed, 14 Nov 2007 16:20:33 +0530

[[[ I've retitled this thread from its original "query" title to something more descriptive. -- Kat ]]]

Hi, Can I run java class file using cron. If yes. then help me. Regards, Mudassar Khan


Thomas Adam [thomas.adam22 at gmail.com]


Wed, 14 Nov 2007 11:04:37 +0000

Hello --

On 14/11/2007, Mudassar Khan <mudassar@jumpgames.co.in> wrote:

>
> Hi,
>
>        Can I run java class file using cron.

Again what the HTML. Stop it.

Yes you can run a java class file with cron.

java somefile
Assumes you have $JAVA_HOME set correctly which you will need to do within the crontab file due to how cron clobbers the environment it runs under.

-- Thomas Adam


Mudassar Khan [mudassar at jumpgames.co.in]


Thu, 15 Nov 2007 15:29:44 +0530

Hi Thomas, I m not able to run java class file in cron.

I have set my crontab like this..

          * * * * * java /opt/javafiles/Movefile >> /tmp/t.log
but I got following error.
   Exception in thread "main" java.lang.NoClassDefFoundError:
.opt.javafiles.Movefile
   at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
   at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
   at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean)
(/usr/lib/libgcj.so.5.0.0)
   at __gcj_personality_v0 (/root/java.version=1.4.2)
   at __libc_start_main (/lib/tls/libc-2.3.4.so)
   at _Jv_RegisterClasses (/root/java.version=1.4.2)
Can you help me..?

Regards, Mudassar Khan


Thomas Adam [thomas.adam22 at gmail.com]


Thu, 15 Nov 2007 12:12:35 +0000

Hello --

Do you somehow not understand how email works? You should reply to the thread you started, and not create a new one, especially since your reply has relevance.

[[[ Thankfully, the thread was not renamed, just not replied to properly, so it wasn't hard to reconcile. Still, thanks for pointing that out, Thomas! -- Kat ]]]

On 15/11/2007, Mudassar Khan <mudassar@jumpgames.co.in> wrote:

> Hi Thomas,
>           I m not able to run java class file in cron.
>
>           I have set my crontab like this..
>
>           * * * * * java /opt/javafiles/Movefile >> /tmp/t.log

This is bad. This will continually run the specified program, not to mention potentially fill up /tmp very quickly if it contains any data.

>           but I got following error.
>
>    Exception in thread "main" java.lang.NoClassDefFoundError:
> .opt.javafiles.Movefile
>    at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)

Install the JRE from Sun, and not use the GNU stuff. My reply to you from before about JAVA_HOME also applies here.

-- Thomas Adam


Trevor Pearson [trevor at haven.demon.co.uk]


Fri, 16 Nov 2007 22:29:30 +0000

Thomas Adam wrote:

> Hello --
>
> Do you somehow not understand how email works?  You should reply to
> the thread you started, and not create a new one, especially since you
> reply has relevance.
>
> On 15/11/2007, Mudassar Khan <mudassar@jumpgames.co.in> wrote:
>   
>> Hi Thomas,
>>           I m not able to run java class file in cron.
>>
>>           I have set my crontab like this..
>>
>>           * * * * * java /opt/javafiles/Movefile >> /tmp/t.log
>>     
>
> This is bad.   This will continually run the specified program, not to
> mention potentially fill up /tmp very quickly if it contains any data.

This is also going to fail because java (sun java, I haven't tested gnu) does not allow a path to be specified like this only a java class name. you need to run a command like this

java -cp /opt/javafiles movefiles 
using the 'classpath' switch to specify a path if the class file is in a directory that is not in your CLASSPATH environment variable.

>>           but I got following error.
>>
>>    Exception in thread "main" java.lang.NoClassDefFoundError:
>> .opt.javafiles.Movefile
>>    at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
>

This error translates as 'didn't find the file' since java has helpfully searched your current directory and CLASSPATH directories for a file called '.opt.javafiles.Movefile.class' . This behaviour must have seemed a sensible idea to someone at sun :)



keyword of types of video card

Mohsen Pahlevanzadeh [mohsen at pahlevanzadeh.org]


Fri, 02 Nov 2007 17:13:27 +0330

Hi, How i bring up keyword of my video? Cheers,

-- 
Mohsen Pahlevanzadeh
email address : mohsen@pahlevanzadeh.org
web site : http://pahlevanzadeh.org
IRC IM : m_pahlevanzadeh
yahoo IM : linuxorbsd

Thomas Adam [thomas.adam22 at gmail.com]


Fri, 2 Nov 2007 18:45:07 +0000

On 02/11/2007, Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> wrote:

> Hi,
> How i bring up keyword of my video?
> Cheers,
lspci
Since you don't actually mention anything else, that's a good enough answer. :)

-- Thomas Adam



using smp kernel, get 100% cpu usage one one cpu without any real load on the system

Predrag Ivanovic [predivan at nadlanu.com]


Thu, 29 Nov 2007 08:26:01 +0100

On Tue, 09 Oct 2007 01:10:33 -0400 jim ruxton wrote:

> Below is  the result of x86info -v: This statement at the bottom is kindof cryptic:
> WARNING: Detected SMP, but unable to access cpuid driver.Used Uniprocessor
> CPU routines. Results inaccurate. Any idea what it could mean??Thanks again
> for the help. 

It means that you don't have CONFIG_X86_CPUID enabled in the kernel (that' s in the 'Processor type and features' section).

  CONFIG_X86_CPUID:   
  This device gives processes access to the x86 CPUID instruction to  
  be executed on a specific processor.  It is a character device  
  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to  
  /dev/cpu/31/cpuid.        
If you want to use x86info, you'll also need to enable CONFIG_X86_MSR.

Pedja

-- 
[...]If they can't think at that point and find information, then they aren't really
cut out to do harder admin. They can go become "Sr. Windows Admins" (senior
with Windows means that they have figured out how to change
the date).- Chuck Yerkes,openbsd mailing list