Linux-Misc Digest #388, Volume #24                Sun, 7 May 00 04:13:04 EDT

Contents:
  Re: Like Defrag.exe in Win, but in Linux. (Rick Hoffman)
  Re: Need to find my IP address (brian moore)
  Re: LILO: Kernel too big (David Bell)
  yeha (Kasey)
  Tunneling through Proxy Servers (even Microsoft) ([EMAIL PROTECTED])
  Re: LILO: Kernel too big ("Erik A. Mogensen")
  Re: PPTP Help: Winnt pptp through a Linux Firewall ("Ron Johnson, Jr.")
  Re: List number of files in directory? (Robert Heller)
  Re: Why partition a Disk? (Robert Heller)
  Re: K7V support ("Steven L. Crone")
  Re: **** USER PERMISSIONS **** (Frederick Artiss)
  Re: LILO: Kernel too big (Markus Kossmann)
  Re: microsoft word on linux (fred smith)
  Re: How do I get linux to recognize my FAT32 partition?
  Re: Need to find my IP address (Tobias Anderberg)
  Re: Why partition a Disk? ("Peter T. Breuer")

----------------------------------------------------------------------------

From: Rick Hoffman <[EMAIL PROTECTED]>
Subject: Re: Like Defrag.exe in Win, but in Linux.
Date: Sat, 06 May 2000 23:10:14 -0400



Stewart Honsberger wrote:

> On Sat, 06 May 2000 23:30:07 GMT, Federico Czerwinski wrote:
> >Hey!, this questoin is a short one, just this, Is there any program for
> >Linux that defrags the disk, just like Defrag.exe in windows? Where can i
> >get it?, Thanx!
>
> This is a pretty FAQ, but nevertheless, any excuse to expound apon the
> virtues of Linux. ;>
>
> The ext2 filesystem isn't as prone to fragmentation as the FAT filesystem
> is. (FAT32 included). I've had a Linux system running for almost a year,
> and I think the / partition was about 2.9% "non-contiguous" when I
> installed a new version of SuSE.
>
> I'm sure there exists a defragmentation utility for Linux, but I highly
> don't reccomend it. Besides that, it just isn't neccesary.
>
> Linux takes care of itself. Let it. :>

Effidently good advice.  I just read in the partition HOWTO that when creating
partitions use the 1 KB default block size if possible.  In so doing ext2
filesystems does not add alot of wasted space the end of each created file.
You may want to experiment with a block size of 2 KB for some partitions, but
expect to meet some seldom exercised bugs because of more fragmentation: Most
people use the default.  Ext2 tries to preallocate space in units of 8
contiguous blocks for growing files. Unused preallocation is released when the
file is closed, so no space is wasted.  It says to use available
defragmentation utilities for Linux at your own risk because they are seldom
used, therefore not tested tough.  Bottom line is that it is not necessary to
carry over this religous habit in the DOS/Windows world into Linux.

hoffy



------------------------------

From: [EMAIL PROTECTED] (brian moore)
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.development.system,comp.os.linux
Subject: Re: Need to find my IP address
Date: 7 May 2000 04:01:51 GMT

On Sun, 07 May 2000 02:20:58 GMT, 
 Kaz Kylheku <[EMAIL PROTECTED]> wrote:
> On 7 May 2000 01:25:34 GMT, brian moore <[EMAIL PROTECTED]> wrote:
> >Perhaps you should just buy a book?  Something like Unix Network
> >Programming should have the above.
> >
> >It will certainly have the much-more-recommended method of finding your
> >IP number, which is to find your hostname and then look it up.  Both
> >methods will be lacking in some circumstances (think of machines with
> >more than one IP number for a trivial case).
> 
> The recommended method is to not try to find your IP number.  Programs that try
> to discover the IP address of the local machine are kludgy, and will break
> under circumstances that the author did not take into account: multiple
> interfaces, IP aliasing, dynamic IP, etc.

Yep, though for some applications, you need to know it (such as ftp and
the god-awful PORT command it uses -- gads, that protocol needs
replacing bad...  all in all it's just plain evil).  When designing new
protocols, it's a very bad thing for the reason we both stated: there
is no good way to determine what the 'real' interface is at the
application layer, and kludges to fake it are stupid.

In such cases, it's best to just bind to IN_ADDR_ANY, and then go look at
the structure after the connect and see what the kernel filled in for
you on the connection.   On most systems, this will return the 'closest'
interface to a given destination.  At worst, it'll return whatever the
system believes is this 'primary' interface.

-- 
Brian Moore                       | Of course vi is God's editor.
      Sysadmin, C/Perl Hacker     | If He used Emacs, He'd still be waiting
      Usenet Vandal               |  for it to load on the seventh day.
      Netscum, Bane of Elves.

------------------------------

From: [EMAIL PROTECTED] (David Bell)
Subject: Re: LILO: Kernel too big
Date: 07 May 2000 04:02:15 GMT

>I am running SuSE 6.4 with kernel 2.2.14.  I compiled a new kernel but
>am having problems.  When running LILO, I get the error that vmlinuz is
>too big.  The kernel has been compiled with both make zImage and make
>bzImage with the same problem.  The file size of the new kernel is
>approx 465 kb.  The default kernel installed by SuSE is over 800 KB and
>lilo has no problem with it.  

Hi!  I'm a linux newbie, so this info might not be 100% correct.  I've had a
similar problem a few months ago with a machine running RedHat 5.2.  Since
you're running Suse, it might be slightly different. Here's the url for the
solution (send me a message if the url doesn't work):

http://x41.deja.com/[ST_rn=ps]/viewthread.xp?AN=569700657&search=thread&sv
cclass=dnyr&ST=PS&CONTEXT=957671701.1052180489&HIT_CONTEXT=957671701.10521
80489&HIT_NUM=36&[EMAIL PROTECTED]%3e
%231/1&group=comp.os.linux.setup&frpage=getdoc.xp&back=clarinet

You'll want to check out messages 7 through 10.  Hope this helps!

=========================
David Bell - Otherwise known as DB7654321

Remember to remove nospam, notrash or anything odd looking from my email
address. :)

------------------------------

From: [EMAIL PROTECTED] (Kasey)
Subject: yeha
Date: Sun, 07 May 2000 04:06:09 GMT

Yeah, i agree

------------------------------

From: [EMAIL PROTECTED]
Subject: Tunneling through Proxy Servers (even Microsoft)
Date: Sun, 07 May 2000 04:01:47 GMT

I've released some java code that will allow a TCP connection through
standard HTTP requests without keep-alives and doesn't require squid
proxy server.

Have at it, if you'd like  http://www.nethole.com



Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: "Erik A. Mogensen" <[EMAIL PROTECTED]>
Subject: Re: LILO: Kernel too big
Date: Sun, 07 May 2000 00:36:31 -0400
Reply-To: [EMAIL PROTECTED]

David Bell wrote:
> 
> >I am running SuSE 6.4 with kernel 2.2.14.  I compiled a new kernel but
> >am having problems.  When running LILO, I get the error that vmlinuz is
> >too big.  The kernel has been compiled with both make zImage and make
> >bzImage with the same problem.  The file size of the new kernel is
> >approx 465 kb.  The default kernel installed by SuSE is over 800 KB and
> >lilo has no problem with it.
> 
> Hi!  I'm a linux newbie, so this info might not be 100% correct.  I've had a
> similar problem a few months ago with a machine running RedHat 5.2.  Since
> you're running Suse, it might be slightly different. Here's the url for the
> solution (send me a message if the url doesn't work):
> 
> http://x41.deja.com/[ST_rn=ps]/viewthread.xp?AN=569700657&search=thread&sv
> cclass=dnyr&ST=PS&CONTEXT=957671701.1052180489&HIT_CONTEXT=957671701.10521
> 80489&HIT_NUM=36&[EMAIL PROTECTED]%3e
> %231/1&group=comp.os.linux.setup&frpage=getdoc.xp&back=clarinet
> 
> You'll want to check out messages 7 through 10.  Hope this helps!
> 
> -------------------------
> David Bell - Otherwise known as DB7654321
> 
> Remember to remove nospam, notrash or anything odd looking from my email
> address. :)
I was using the image in /usr/src/linux/arc/i386/boot and it was a no
go.  I finally solved it by moving to kernel version 2.3.46 and all is
running well....

Erik A. Mogensen

------------------------------

From: "Ron Johnson, Jr." <[EMAIL PROTECTED]>
Subject: Re: PPTP Help: Winnt pptp through a Linux Firewall
Date: Sat, 06 May 2000 23:47:12 -0500

Michael Bernardo wrote:
> 
> I am trying to setup a Linux firewall to allow a Windows NT client from the
> Internet to connect to our internal network. The firewall (RH6.1) is already
> setup with ipchains, ipmasqadm, ppp, and pptpd.  The Windows NT client
> outside seems to get authenticated fine by the firewall, but then, NT
> complains that it fails to negotiate.  What I want to do is to be able to
> map Windows NT drives through pptp over the Internet.  Has anyone been able
> to do this?  Can anyone lead me to a more specific HOW-TO about my problem?
> Thanks.

Look for the "VPN masquerade" HOWTO at Tucows.com

-- 
+----------------------------------------------------------+
| Ron Johnson, Jr.        Home: [EMAIL PROTECTED]       |
| Jefferson, LA  USA      WWW : [EMAIL PROTECTED]     |
|                                                          |
| Most overused words: feel, cool/kewl, fun, myBlah.com    |
| Most underused word: think                               |
+----------------------------------------------------------+

------------------------------

From: Robert Heller <[EMAIL PROTECTED]>
Subject: Re: List number of files in directory?
Date: Sun, 07 May 2000 04:49:39 GMT

  [EMAIL PROTECTED] (Ken Williams),
  In a message on Sun, 07 May 2000 00:40:24 GMT, wrote :

KW> How can I find out how many files are under a branch?  like under DOS I could 
KW> type 
KW> 
KW> cd \temp
KW> dir /s
KW> 
KW> and end up showing my the number of files and the total size of them all.
KW> 
KW> Under Linux all I got it du for the total size. How about the number of files? 
KW>  Why does ls suck so much?   It should have a swich like -t for totals or 
KW> whatever.
KW>                                                                                    
               

ls does not suck.  The idea is that rather than duplicate the guts of
'wc' in every joe, dick, and harry command you use a pipe:

total file count:

find /s -print | wc -l

'ls -1AR /s | grep -v '^$' | grep -v ':$'|wc -l' also works, but is a bit
more cumbersome. :-)

You can even do things like:

du -s -k /s/* | sort -nr | head -10

to get a top-ten list of large files & directories.





                                                                          
-- 
                                     \/
Robert Heller                        ||InterNet:   [EMAIL PROTECTED]
http://vis-www.cs.umass.edu/~heller  ||            [EMAIL PROTECTED]
http://www.deepsoft.com              /\FidoNet:    1:321/153

------------------------------

From: Robert Heller <[EMAIL PROTECTED]>
Subject: Re: Why partition a Disk?
Date: Sun, 07 May 2000 04:49:38 GMT

  Rick Hoffman <[EMAIL PROTECTED]>,
  In a message on Sat, 06 May 2000 18:33:50 -0400, wrote :

RH> Peter, while I got your attention.  Is there any reason that a normal user have 
access to
RH> the /usr and /var and /etc ..., etc directories other than the users own /home 
directory?
RH> If not how do you hide those directories from the normal user?

Normal users need *read* access to /usr, /var, and /etc (write access to
/tmp and /usr/tmp (/var/tmp on some systems)).  Most of the programs
normal users *use* live in /usr/bin, with their libraries in /usr/lib
and shared data in /usr/share, plus documentation in /usr/man,
/usr/info, and /usr/doc.  Various configuration files live in
/etc and /var -- UID,GID  => user,group mapping from /etc/passwd, for
example, the IP number of the DNS servers from /etc/resolv.conf, user
mounted file systems from /etc/fstab.  There really is no reason to
'hide' these file systems from normal users.  If you are *paranoid*,
turn on shadow passwording -- this means that although /etc/passwd is
world readable -- it needs to be, because it is used for mapping username
to UIDs and to get other random user information -- the passwords
(encrypted) live in /etc/shadow, which is protected from user access. 
Nothing else in /etc, /usr or /var needs protection from noisy users
(some of the log files in /var/log are protected, but I am not sure
why).  Individual users can do whatever they like with chmod to their
directories under /home -- the system won't care.

RH> 
RH> Also, I am trying to delete a normal user account using Linuxconf.  I can't seem 
to get rid
RH> of the account.  I cannot login with the account that I just tried to delete but 
it is still
RH> there in Linuxconf.  It is just bothering me that in the user listing Linuxconf 
still shows
RH> that account.
RH> 
RH> One more question if I may, without getting into details which I understand might 
not allow
RH> you enough info to answer this but I have to login as root inorder to "turn on" my 
sound
RH> card.  I've pointed an alias to a small script the runs several insmod commands to 
do it.
RH> When I log in as a normal user the alias runs the script because I inserted the 
alias into
RH> /.bashrc but the insmod commands won't run.  Any suggestions?  I guess ultimantly 
I want the
RH> sound card "turned on" when I boot up.  How do I do that?  Can the boot up process 
run this
RH> script or something?

Put the startup script in /etc/rc.d/rc.local -- rc.local is run *last*
in the startup process.

RH> 
RH> Thanks
RH> 
RH> hoffy
RH> 
RH>                                                                                    
              






                                                                                       
     
-- 
                                     \/
Robert Heller                        ||InterNet:   [EMAIL PROTECTED]
http://vis-www.cs.umass.edu/~heller  ||            [EMAIL PROTECTED]
http://www.deepsoft.com              /\FidoNet:    1:321/153

------------------------------

From: "Steven L. Crone" <[EMAIL PROTECTED]>
Subject: Re: K7V support
Date: Sun, 07 May 2000 02:08:13 -0400

Michael Reiche wrote:

> Sandhitsu R Das wrote:
> >
> > Asus K7V w/ Athlon and WD 7200 ATA/66 HDD - is this combination well
> > supported in Linux ?
>
> I'm running on a system with a ASUS K7V. No problem.
>
> Right now I only have UDMA (ATA/33 HDD) so I don't now about ATA/66...
>
> /Reiche

I am running a Gateway Select (Okay so I finally bought one, after
building 500 PCs can you blame me, let somebody else put screws in for
awhile:) with a K7-650 and a Quantum Fireball 20GB ATA-66.  Though I
can't speak for your mainboard, my experience has been that I can mount
my ATA-66 drive, but it will not support the speed advantage of the
drive.  Meaning it runs as a UDMA 33 type.  No problems so far
writing/reading from the disk.  Good Luck.

Steven Crone


------------------------------

From: Frederick Artiss <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.networking,com.os.linux.redhat,comp.os.linux.setup,nf.comp.linux,alt.os.linux
Subject: Re: **** USER PERMISSIONS ****
Date: Sun, 07 May 2000 02:32:29 -0400

What distro of Linux have you? For RedHat there is linuxconf.

Tux wrote:

> Hi there,
>
> Is there any way to set user permissions in linux as you would in
> another NOS like NT or Novell...??   What I am referring to is the
> ability to assign individual users with the access to perform some,
> most, or all of the actions of a root or su user....  For instance,
> would I be able to assign access rights to an ordinary user so they
> would be able to shutdown the system, edit system files, or something
> similar...??? *s*
>
> Thanks,
> Trevor...


------------------------------

From: Markus Kossmann <[EMAIL PROTECTED]>
Subject: Re: LILO: Kernel too big
Date: Sun, 07 May 2000 07:50:55 +0200

"Erik A. Mogensen" wrote:
> 
> I am running SuSE 6.4 with kernel 2.2.14.  I compiled a new kernel but
> am having problems.  When running LILO, I get the error that vmlinuz is
> too big.  The kernel has been compiled with both make zImage and make
> bzImage with the same problem.  The file size of the new kernel is
> approx 465 kb.  The default kernel installed by SuSE is over 800 KB and
> lilo has no problem with it.
Did you use "make zImage" ?  Try "make bzImage" instead .


--
Markus Kossmann                                    
[EMAIL PROTECTED]

------------------------------

From: fred smith <[EMAIL PROTECTED]>
Subject: Re: microsoft word on linux
Date: Sat, 6 May 2000 21:29:58 GMT

Jim Tom Polk <[EMAIL PROTECTED]> wrote:
:> Have you compared this to vmware, and if so, do you like win4lin better ?
:> 

: Yes. VMWare is more full featured, but eats memory to gain those
<snip>
: It would not be the choice if you had a third party application that
: used vxd files, sound, Microsoft Networking or DirectX, none of which I
: need.

does anyone know if Lotus Notes (4.6) client runs on Win4lin? It barely
runs, with a lot of flaws, under Wine,... I'd like to be able to run it
with somewhat less flakiness. Feedback appreciated.

Fred
-- 
---- Fred Smith -- [EMAIL PROTECTED] ----------------------------
                       I can do all things through Christ 
                              who strengthens me.
============================== Philippians 4:13 ===============================

------------------------------

From: <[EMAIL PROTECTED]>
Subject: Re: How do I get linux to recognize my FAT32 partition?
Date: Sun, 07 May 2000 07:30:02 GMT


Matt wrote:
> 
> [EMAIL PROTECTED] wrote:
> > 
> > My pc has 2 hard drives. The master is a 2 gig with win. 95 installed 
on
> > it. The slave is a 4 gig with one 2 gig partition for Linux and 2 gig 
on a
> > FAT32 Partition. Someone said u could do this but I dont know how. They
> > said u have to mount it but when I go into my disk manager, Its not 
there.
> > Theres hdb5 which is /linux and hdb6 which is / (besides my floppy and 
cd-
> > rom) How do I get it to list that partition (hdb1)? Any help would be
> > appriciated. Thanks.
> > 
> > --
> > Posted via CNET Help.com
> > http://www.help.com/
> 
> I don't know what disk manager you are using but;
> 
> fdisk /dev/hda
> andfdisk /dev/hdb
> 
> should let you see how your drives are partitioned using 'p'.
> (use this tool carefully!)
> 
> You will need to configure fat32 support into the kernel if it isn't
> already.
> Then mount the drive so:
> 
> mount -t vfat /dev/hdb2 /mnt (or wherever)
> 
> Hope this helps,
> Matt.




That did the trick. Thanks alot Matt.


--
Posted via CNET Help.com
http://www.help.com/

------------------------------

From: [EMAIL PROTECTED] (Tobias Anderberg)
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.development.system,comp.os.linux
Subject: Re: Need to find my IP address
Reply-To: [EMAIL PROTECTED]
Date: Sun, 7 May 2000 09:34:11 +0200

Chris <[EMAIL PROTECTED]> wrote:
>>      int fd;
>>      struct ifreq i;
>>      fd = socket(AF_INET, SOCK_DGRAM, 0);
>>      strncpy(i.ifr_name, "eth0", 5);
>>      ioctl(fd, SIOCGIFADDR, (int) &i);
>>      close(fd);
>>      return (char *)inet_ntoa(((struct sockaddr_in *)
>>              &i.ifr_addr)->sin_addr);
>
>Herein lies one of my biggest complaints about the Linux development
>environment: there should be no reason why an application programmer must
>rely on undocumented "catch-all" calls to accomplish simple tasks.  The

This is, of course, not the only way of doing it. And about beeing
undocumented, they are "documented" in the kernel source. If
you're not too lazy and have a little interest in learning, there
souldn't be any trouble looking at the source for information on
how accomplish certain tasks.

>"man ioctl_list" page is a complete waste of time-- it's hopelessly out of
>date and only contains the argument type for each command without any
>explaination of where, why or how each should be used.  Application

In an open source "environment" you just can't rely on somebody
else to do the all the work for you (well, sometimes you can). If
you find that somethings missing or needs to be fixed, then by all
means, fix it.

>programmers shouldn't have to resort to sifting through the kernel source
>code to figure out how to perform simple and common tasks.

Usually people don't wade through the kernel source for "simple
and common" tasks. Rather to see how a certain driver, part of
kernel and so on work, to gain deeper knowledge of the
operating system, they need to fix something, or out of plain
interest.

If I wanted to know how to fetch my IP, I certainly wouldn't look
in the kernel source for that (at least not at first). That's just
something I picked up during my general kernel "research" and I
found it to be a easy way of solving this particular problem.

>People who write device drivers or kernel modules should provide a proper
>man(2) or man(3) page.  Ideally, we should kill off the ioctl() function
>and place all accessible driver variables in /proc.

Killing of ioctl() would be a Bad Idea<TM>.

/tobias
-- 
"There's no trick to it, it's just a simple trick!"
                        - Goodman, The Simpsons

------------------------------

From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: Why partition a Disk?
Date: 7 May 2000 07:55:28 GMT

Hal Burgiss <[EMAIL PROTECTED]> wrote:
: On 7 May 2000 00:03:06 GMT, Peter T. Breuer <[EMAIL PROTECTED]> wrote:
:>Hal Burgiss <[EMAIL PROTECTED]> wrote:
:>But somehow it makes me feel better. At least / gets some exercise.

: Interesting, thanks. What's your opinion of readonly / ? 

A great idea if you can manage it. Watch out for mount (mtab) and
passwd (passwd).

Peter

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.misc) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Misc Digest
******************************

Reply via email to