Linux-Misc Digest #456, Volume #25               Tue, 15 Aug 00 19:13:02 EDT

Contents:
  Re: why suid'ed shutdown refuses to run? (Dances With Crows)
  Re: LILO malfunction
  root $PATH in SuSE6.3 (MKalinka)
  Busy cdrom (Dave Barcelo)
  Re: Problem With /bin/login Behavior (Floyd Davidson)
  Re: Linux Directory Handling (Floyd Davidson)
  Re: Root Password and logon (Floyd Davidson)
  Re: root $PATH in SuSE6.3 (Tony Lawrence)
  Re: Busy cdrom (MKalinka)
  Re: Busy cdrom
  Re: Busy cdrom (Dave Barcelo)
  Re: root $PATH in SuSE6.3 (MKalinka)
  Re: HD LED permanently on (Jo Hallel)
  Re: NIS+ (Roland Mainz)
  Re: why suid'ed shutdown refuses to run? (Dances With Crows)
  Re: Linux Directory Handling (Harlan Grove)
  Re: Busy cdrom (Joshua Baker-LePain)
  Re: Allowing all users to access and write to a partition ("loco")
  Re: FWD: Red Hat's CFO abandoning ship. ([EMAIL PROTECTED])
  Re: Linux Directory Handling ([EMAIL PROTECTED])

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

From: [EMAIL PROTECTED] (Dances With Crows)
Subject: Re: why suid'ed shutdown refuses to run?
Date: 15 Aug 2000 21:22:23 GMT
Reply-To: [EMAIL PROTECTED]

On Tue, 15 Aug 2000 14:49:11 GMT, M. Buchenrieder wrote:
>[EMAIL PROTECTED] writes:
>>I am experimenting with the suid stuff. In an experiment
>>I create a script /bin/shutdown which just exec /sbin/shutdown.
>This is a bad idea to begin with (Not the /sbin/shutdown call, but the
>setUID script).  Luckily, the Linux kernel is smart enough to properly
>detect  this and ignores the setUID bit on scripts that are not calling
>a setUID-aware shell (like, e.g., sperl).  Simple answer: Don't do it.
>SetUID scripts are such a huge security risk that you should never get
>the habit of using it even if you were using a system that supported
>it.  What you want is writing a wrapper program to call the command in
>question, or (easier) using "sudo" for this task.

OK, maybe someone could clear this up for me...  As a result of a silly
program that can't see a joystick unless it's in analog mode, I wrote a
small C wrapper like so:
  #include<stdlib.h>
  int main(void){ system("rmmod joy-gravis"); system("insmod joy-analog
  js_an=0x201,0xf3"); return 0; }
Compiled, put it in /usr/local/bin/, chowned it to root.root, and
chmodded it 4755.  If a normal user tries to execute it, he'll get
"rmmod: operation not permitted".  If the program is recompiled to
merely execve("/usr/local/bin/joyscript") where joyscript contains:
  #!/bin/sh
  rmmod joy-gravis
  insmod joy-analog js_an=0x201,0xf3
then the same thing occurs.  However, either approach works when I do
the appropriate thing with sudo.  Obviously, I'm missing something
blindingly obvious--the man pages for seteuid(2) and setuid(2) make me
assume there's a way to do this, but I'm too thick to figure it out
without prodding.

Any help appreciated, naturally....

-- 
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /  Those who do not understand Unix are
http://www.brainbench.com     /   condemned to reinvent it, poorly.
=============================/           ==Henry Spencer

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

From: <[EMAIL PROTECTED]>
Subject: Re: LILO malfunction
Date: Tue, 15 Aug 2000 17:25:38 -0400

I am not sure of what LI stands for exactly but...

If you are using an IDE drive, do the following :


1)  Turn off the "Auto" feature of the bios.
2)  Auto detect the hdd , and boot it in LBA, large and normal modes , and
stop on the one that works.

3) Check the bios clock to see if it is drifting. This could mean - among
other things- that the battery is running down.

RH uses /boot/boot.b

Is your /boot partition *completely* within the 1024 cylinder limit ?


Jeff Muse <[EMAIL PROTECTED]> wrote in message
news:8n50vt$bc0$[EMAIL PROTECTED]...
> Hope you made a boot disk, 'cuz you're gonna need it. Boot off your floppy
> and look at /etc/lilo.conf.
>
> When LILO hangs at LI, that means that it lost the secondary boot loader,
> which should be /boot/chain.b, or maybe /boot/boot.b - I don't know which
RH
> uses. This secondary boot loader is what reads and uncompresses the
kernel.
> It should be listed in the first section of /etc/lilo.conf and say
something
> like install = /boot/boot.b. If it doesn't, that's why LILO can't find the
> secondary loader.
>
> If it does have the install line, then about the only thing you can do is
> make a separate boot partition - about 10 MB is plenty - and copy
everything
> in /boot over to it. Then edit /etc/lilo.conf to reflect the new location
of
> the boot image and type "lilo" at a command line. You should get some sort
> of a message reflecting the changes you made. Then try rebooting off your
> hard drive, and it should work. Sometimes your problem happens with an
older
> BIOS, so this could be a sign you need to upgrade.
>
> Good luck.
>
> Jeff Davis <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > I am really not sure what this is, but I have seen it on multiple
> > occasions:
> >
> > the computer boots and says "LI" instead of "LILO:" and you can't do
> > anything. I think you can take a distribution cd and fix it by doing an
> > upgrade of nothing, but there has to be a better way. Is GRUB a better
> > option? I think Mandrake 7.1 uses it. Right now I am using RedHat 6.1.
> >
> > Thanks,
> > Jeff Davis
> >
>
>



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

From: MKalinka <[EMAIL PROTECTED]>
Subject: root $PATH in SuSE6.3
Date: Tue, 15 Aug 2000 23:35:59 +0200

This is a multi-part message in MIME format.
==============9F4201640685186911D75D7E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello !

The variable PATH after root-login looks like
/sbin:/usr/sbin:/usr/local/sbin//root/bin... (sic)
i need direct access to /root/bin, so which script
has forgotten to put the ":" the right place ?

thank you

Michael
==============9F4201640685186911D75D7E
Content-Type: text/x-vcard; charset=us-ascii;
 name="MKalinka.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for MKalinka
Content-Disposition: attachment;
 filename="MKalinka.vcf"

begin:vcard 
n:Kalinka;Michael
tel;home:0431/728426
x-mozilla-html:FALSE
url:http://home.t-online.de/home/MKalinka
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;0
fn:Michael Kalinka
end:vcard

==============9F4201640685186911D75D7E==


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

From: Dave Barcelo <[EMAIL PROTECTED]>
Subject: Busy cdrom
Date: Tue, 15 Aug 2000 16:47:02 -0500
Reply-To: [EMAIL PROTECTED]

I am trying to unmount my cdrom and the mount command keeps telling me
it is busy.  I tried to see if there were any open files on it using
lsof and there aren't.  Nor is it the cwd for any processes.

Can anyone help?
Dave


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

From: Floyd Davidson <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.security
Subject: Re: Problem With /bin/login Behavior
Date: 15 Aug 2000 11:08:53 -0800

"Mark T. Dame" <[EMAIL PROTECTED]> wrote:
>Floyd Davidson wrote:
>> 
>> "Bill \"Houdini\" Weiss" <[EMAIL PROTECTED]> wrote:
>> >On Mon, 14 Aug 2000 18:17:07 -0400, Mara allowed "Mark T. Dame"
>> ><[EMAIL PROTECTED]> to write:
>> >
>> >>Hello.
>> >>
>> >>I have a RedHat 6.2 system on which I need to change the behavior of
>> >>/bin/login for telnet sessions.  When you telnet to the box and press
>> >><Enter> at the login: prompt (without entering a username) you get
>> >>"Login incorrect".  On the console it just gives you another login:
>> >>prompt.  I need /bin/login to behave the same way for a telnet session
>> >>as it does for the console (at least in this regard).
>> >
>> He did not say he wanted a null login.  He wants a null entry to
>> cause a "Login incorrect" response rather than just provide
>> another login prompt.
>
>You got it backwards.

Yep.  Sorry about that, I wasted all that time writing it too!

> 
>> That would be a rather simple hack to make to the getty program;
>> however, it is probably not one that should actually be made.
>> 
>> The typical script for a shell login via a serial port expects
>> to be able to send multiple newlines to the serial port to
>> eventually wake up a getty process of some kind, and
>> then detect a "login:" prompt.  
>
>Exactly, and by default, RedHat (at least) doesn't behave that way.  It
>gives you "Login incorrect" when you don't provide a password rather
>than just prompting you again with "login:".  In my mind, this is broken
>behavior.  

That prompt comes from your telnet daemon.  I'm not using RedHat's
distribution of Linux, and my particular telnet does not do what you
are describing, but does do what you want.

If you are, or have access to, a reasonably talented C programmer, it
is not likely to be hard at all to hack the source code for telnetd
to get the behavior you desire.  If that is not an option, try getting
the telnetd program from another distribution (mine is from a really
old Slackware I think).

  Floyd

-- 
Floyd L. Davidson                          [EMAIL PROTECTED]
Ukpeagvik (Barrow, Alaska)

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

From: Floyd Davidson <[EMAIL PROTECTED]>
Subject: Re: Linux Directory Handling
Date: 15 Aug 2000 13:07:30 -0800

<[EMAIL PROTECTED]> wrote:
>If I am to handle very lengthy and complex directories while doing a high
>level application processing...
>
>Is there any utility to go back and forth easily in the directories?
>
>For example
>
>If I am in the 10th sub-dir and want to go to the 4th sub-dir back and from
>there another route...
>
>Pl. let me know.

There are several ways.  Read up on the cd, pushd, popd, and
dirs commands built into bash.

For a small amount of added flexibility with the cd command,
PWD, OLDPWD, CDPATH variables are useful in shell scripts, and
for interactive use a command "cd -" is the same as "cd
$OLDPWD", which takes you back to the previous working
directory.  User defined variables are also very used, as
described below.

Other commands that are perhaps more useful for jumping around
amongst a number of directories are pushd, popd, and dirs.  The
pushd command adds directories to a stack or manipulates the
stack and cd's to the directory placed at the top of the stack.
popd removes entries from the stack or cd's the directory at the
top of the stack.  dirs displays the stack.

Hence you might use pushd to generate a stack, and then use dirs
to just view that stack.  pushd is then used to cd to any given
directory on the stack.  For interactive use, I have a function
in .bashrc,

  function pd { 
    while [ $# -ne 0 ] 
    do 
      pushd $1 > /dev/null 2>&1 
      shift 
    done 
    dirs 
    return 0 
  } 

Which allows multiple arguments to pushd, hence to push several
directories on the stack at once,

  pd /u1 /u2 /u3 /u4 /u5

will accomplish it, and dirs (or pd with no arguments) will show

  /u5 /u4 /u3 /u2 /u1

Then any directory can be selected (even with multiple arguments)
by using "pd +3" for example to cd to /u2 in the above stack.

Also, for the specific example asked about (moving from the
tenth subdir to the 4th subdir),

  cd ../../../../../..

will do that.

And there is nothing preventing either interactive or script use
of user defined variables that are set to specific directories
that are commonly used:

export A=/u1/projects/outdated/budget/1999/june
export B=/u1/projects/current/budget/2000/june

and from then on,

  cd $A

and 

  cd $B

are a lot easier to do than is using the full path name.

  Floyd

-- 
Floyd L. Davidson                          [EMAIL PROTECTED]
Ukpeagvik (Barrow, Alaska)

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

From: Floyd Davidson <[EMAIL PROTECTED]>
Subject: Re: Root Password and logon
Date: 15 Aug 2000 11:33:20 -0800

Eric <[EMAIL PROTECTED]> wrote:
>Bruce T Armstrong wrote:
>> 
>> Is there a way to go straight into LINUX and avoid logging on for
>> ever.
>> Bruce T.
>
>Yes there is,
>
>you can boot the system single user, which by default isn't password
>protected
>on RH systems (other distro's might have this protected). If you want
>multi-user mode, you can change an entry in /etc/initab
>
>the line containing:
> 1:2345:respawn:/sbin/mingetty tty1
>you can change to:
> 1:2345:respawn:/bin/su - USERNAME
>
>As a remark: this can be done, but I strongly advise you you not to do
>this

Well, at least the last line is certainly good advice!

The problem with going single user is that you are then missing
many of the services provided by the system.

There are two other, much more reasonable ways.  First, a word
of caution that this of course only applies to a home computer
where security is absolutely unimportant.  (And recognize that
some would say that means it must be in a locked room with no
access to anything like the Internet... :-)

One solution is login and just do not logout.

The other is to edit the /etc/passwd  file (or the appropriate
shadow password file) and just delete the password for your
login.  Here is an example entry from /etc/shadow, with
no password between the two colons after the user name:

floyd::10124:0:99999:7:::

That results in no password being required, and a login will
consist only of telling it which user id should be logged in,
hitting the enter key, and bingo you get logged in with no
prompt for a password ever appearing.

But, just like the other suggestion, I don't advise doing
this either.

  Floyd

-- 
Floyd L. Davidson                          [EMAIL PROTECTED]
Ukpeagvik (Barrow, Alaska)

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

From: Tony Lawrence <[EMAIL PROTECTED]>
Subject: Re: root $PATH in SuSE6.3
Date: Tue, 15 Aug 2000 18:04:29 -0400

MKalinka wrote:
> 
> Hello !
> 
> The variable PATH after root-login looks like
> /sbin:/usr/sbin:/usr/local/sbin//root/bin... (sic)
> i need direct access to /root/bin, so which script
> has forgotten to put the ":" the right place ?


Normally $HOME would be /root, and $HOME/.profile would have

PATH=$PATH:$HOME/bin


-- 
Tony Lawrence ([EMAIL PROTECTED])
SCO/Linux articles, help, book reviews, tests, 
job listings and more : http://www.pcunix.com

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

From: MKalinka <[EMAIL PROTECTED]>
Subject: Re: Busy cdrom
Date: Tue, 15 Aug 2000 23:59:08 +0200

This is a multi-part message in MIME format.
==============3F441EA7C6E1FF82252E18D7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dave Barcelo wrote:
> 
> I am trying to unmount my cdrom and the mount command keeps telling me
> it is busy.  I tried to see if there were any open files on it using
> lsof and there aren't.  Nor is it the cwd for any processes.
> 
> Can anyone help?
> Dave
Maybe you're standing inside the path of your mounted cdrom,
kfm or console.

Michael
==============3F441EA7C6E1FF82252E18D7
Content-Type: text/x-vcard; charset=us-ascii;
 name="MKalinka.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for MKalinka
Content-Disposition: attachment;
 filename="MKalinka.vcf"

begin:vcard 
n:Kalinka;Michael
tel;home:0431/728426
x-mozilla-html:FALSE
url:http://home.t-online.de/home/MKalinka
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;0
fn:Michael Kalinka
end:vcard

==============3F441EA7C6E1FF82252E18D7==


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

From: [EMAIL PROTECTED] ()
Subject: Re: Busy cdrom
Reply-To: [EMAIL PROTECTED]
Date: Tue, 15 Aug 2000 22:06:30 GMT

On Tue, 15 Aug 2000 16:47:02 -0500, Dave Barcelo <[EMAIL PROTECTED]> wrote:
>I am trying to unmount my cdrom and the mount command keeps telling me
>it is busy.  I tried to see if there were any open files on it using
>lsof and there aren't.  Nor is it the cwd for any processes.
>
>Can anyone help?

Make sure you don't have any windows where the shell is cd'd to
/mnt/cdrom.


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

From: Dave Barcelo <[EMAIL PROTECTED]>
Subject: Re: Busy cdrom
Date: Tue, 15 Aug 2000 17:07:45 -0500
Reply-To: [EMAIL PROTECTED]

[EMAIL PROTECTED] wrote:

> On Tue, 15 Aug 2000 16:47:02 -0500, Dave Barcelo <[EMAIL PROTECTED]> wrote:
> >I am trying to unmount my cdrom and the mount command keeps telling me
> >it is busy.  I tried to see if there were any open files on it using
> >lsof and there aren't.  Nor is it the cwd for any processes.
> >
> >Can anyone help?
>
> Make sure you don't have any windows where the shell is cd'd to
> /mnt/cdrom.

Nothing is in the path.


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

From: MKalinka <[EMAIL PROTECTED]>
Subject: Re: root $PATH in SuSE6.3
Date: Wed, 16 Aug 2000 00:10:00 +0200

This is a multi-part message in MIME format.
==============34A7E09249FD6C2D1B340969
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Tony Lawrence wrote:
> 
> MKalinka wrote:
> >
> > Hello !
> >
> > The variable PATH after root-login looks like
> > /sbin:/usr/sbin:/usr/local/sbin//root/bin... (sic)
> > i need direct access to /root/bin, so which script
> > has forgotten to put the ":" the right place ?
> 
> Normally $HOME would be /root, and $HOME/.profile would have
> 
> PATH=$PATH:$HOME/bin
> 
> --
> Tony Lawrence ([EMAIL PROTECTED])
> SCO/Linux articles, help, book reviews, tests,
> job listings and more : http://www.pcunix.com

Of course it works, thank you.
But the mistake remains.

Michael
==============34A7E09249FD6C2D1B340969
Content-Type: text/x-vcard; charset=us-ascii;
 name="MKalinka.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for MKalinka
Content-Disposition: attachment;
 filename="MKalinka.vcf"

begin:vcard 
n:Kalinka;Michael
tel;home:0431/728426
x-mozilla-html:FALSE
url:http://home.t-online.de/home/MKalinka
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;0
fn:Michael Kalinka
end:vcard

==============34A7E09249FD6C2D1B340969==


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

Date: Tue, 15 Aug 2000 23:17:03 +0100
From: Jo Hallel <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.help
Subject: Re: HD LED permanently on

David Efflandt wrote:
> 
> On Sun, 13 Aug 2000 21:05:00 +0100, Jo Hallel <[EMAIL PROTECTED]> wrote:
> >David Efflandt wrote:
> >>
> >> On Sun, 13 Aug 2000 10:22:52 +0100, Jo Hallel <[EMAIL PROTECTED]> wrote:
> >> >In windows my HD LED behaves normally. However in Linux (SuSE 6.4) it
> >> >now remains permanently on. The only time that it does behave "normally"
> >> >is if I cause the CDROM to fail. Previous advice (thanks Hal) suggested
> >> >that there may be CD applets running, but I see no evidence of this.
> >> >
> >> >(Trivial, but important, as it was the first thing a mate commented on
> >> >when showing him Linux. If I can get this sorted, I may be able to
> >> >convince him to load Linux himself).
> >>
> >> Are they properly jumpered as 'master' and 'slave'.  Maybe the hd is
> >> jumpered as 'single' instead of 'master' or the cdrom is 'master' instead
> >> of 'slave'.
> >>
> >> --
> >> David Efflandt  [EMAIL PROTECTED]  http://www.de-srv.com/
> >> http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
> >> http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/
> >
> >Thanks for the reply. I've checked (the jumber settings), and the HD is
> >master on the primary IDE port and the CDROM is slave on the secondary.
> >
> >One piece of info that may be relevant - it a CD-RW (Smart and friendly
> >4424A). Would this make a difference?
> 
> I assume you are discussing a drive on each cable and not both drives on
> the same cable.
> 
> If these are the only 2 drives you have, then the hd on the 1st IDE
> channel should be jumpered as single (which may or may not be same as
> master).  And the CDROM on the 2nd IDE port should also be jumbered as
> single or master.  What drive is your cdrom now, hdc or hdd?
> 
> Master or slave refer to each IDE channel and I don't think you can have a
> slave without a master (which may be your problem).  This is probably why
> your drive light is on all the time unless you crash your cdrom.
> 
> --
> David Efflandt  [EMAIL PROTECTED]  http://www.de-srv.com/
> http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
> http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/

Thanks for the reply (again). The Quick Installation guide that came
with the device indicated that the optimum configuration on most systems
was to have the device alone as Slave on the secondary IDE port (which
it is). This works under windows. I will try (at some point) making the
device. I'll reply to myself to keep the Newsgroup informed.

Jo

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

From: Roland Mainz <[EMAIL PROTECTED]>
Crossposted-To: alt.solaris.x86,comp.unix.solaris,comp.unix.admin,alt.os.linux
Subject: Re: NIS+
Date: Tue, 15 Aug 2000 23:38:49 +0200

Brat wrote:
> 
> I Recall that Linux currenlty supports only NIS (not NIS+) - at least as
> a server. It could be possible to
> make Linux act as a NIS+ client dunno...
> (this was the situation at start of this year)

SuSE 6.4 Linux can run as normal NIS+ client...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  [EMAIL PROTECTED]
  /O /==\ O\  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
 (;O/ \/ \O;) TEL +49 641 99-13193 FAX +49 641 99-41359

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

From: [EMAIL PROTECTED] (Dances With Crows)
Subject: Re: why suid'ed shutdown refuses to run?
Date: 15 Aug 2000 22:21:18 GMT
Reply-To: [EMAIL PROTECTED]

[Argh, following up to my own post... figured it out.]
On 15 Aug 2000 21:22:23 GMT, Dances With Crows wrote:
>OK, maybe someone could clear this up for me...  As a result of a silly
>program that can't see a joystick unless it's in analog mode, I wrote a
>small C wrapper like so:
>  #include<stdlib.h>
>  int main(void){ system("rmmod joy-gravis"); system("insmod joy-analog
>  js_an=0x201,0xf3"); return 0; }
>Compiled, put it in /usr/local/bin/, chowned it to root.root, and
>chmodded it 4755.  If a normal user tries to execute it, he'll get
>"rmmod: operation not permitted".  If the program is recompiled to
>merely execve("/usr/local/bin/joyscript") where joyscript contains:
>  #!/bin/sh
>  rmmod joy-gravis
>  insmod joy-analog js_an=0x201,0xf3
>then the same thing occurs.  However, either approach works when I do
>the appropriate thing with sudo.  Obviously, I'm missing something
>blindingly obvious--the man pages for seteuid(2) and setuid(2) make me
>assume there's a way to do this, but I'm too thick to figure it out
>without prodding.

Argh.  This works; leaving the setuid() call out will NOT work:
#include<unistd.h>
#include<stdlib.h>
int main(void){
   setuid(0);
   system("rmmod joy-gravis ; insmod joy-analog js_an=0x201,0xf3");
   return 0;
}

-- 
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /  Those who do not understand Unix are
http://www.brainbench.com     /   condemned to reinvent it, poorly.
=============================/           ==Henry Spencer

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

From: Harlan Grove <[EMAIL PROTECTED]>
Subject: Re: Linux Directory Handling
Date: Tue, 15 Aug 2000 22:21:51 GMT

In article <[EMAIL PROTECTED]>,
 Tony Lawrence <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] wrote:
>>
>>If I am to handle very lengthy and complex directories while doing a
>>high level application processing...
>>
>>Is there any utility to go back and forth easily in the directories?
>>
>>For example
>>
>>If I am in the 10th sub-dir and want to go to the 4th sub-dir back
>>and from there another route...
>
>You mean like cd ../../../.. ?

Could still be a lot of typing. Put the following into your ~/.bachrc

function pd {
        typeset -i n=${1:-1}
        unset x
        while [ n -gt 0 ]
        do
                x=${x}${x:+/}..
                let n=n-1
        done
        cd ${x:-.}
        unset x n
}

Then the interactive command  pd 4  would move you up 4 directory
levels. Note: no error checking.


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

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

From: Joshua Baker-LePain <[EMAIL PROTECTED]>
Subject: Re: Busy cdrom
Date: 15 Aug 2000 22:44:13 GMT

Dave Barcelo <[EMAIL PROTECTED]> wrote:
> I am trying to unmount my cdrom and the mount command keeps telling me
> it is busy.  I tried to see if there were any open files on it using
> lsof and there aren't.  Nor is it the cwd for any processes.

Are you sure of that last bit?  Sometimes such things are hard to determine.
If you launched a backgrounded process from anywhere under /mnt/cdrom,
even if the host shell is gone, the cdrom will still look busy if that
process is alive.

Anyways, what environment are you running in?  I don't run Gnome or KDE or
any such stuff, but they may have their grubby little fingers in there
somehow.  Also, on the off chance, are you running VMware?  When the devices
are connected to the guest OS, they'll look busy to Linux.  You can
disconnect them and that will solve the problem.  

-- 
Joshua Baker-LePain
Department of Biomedical Engineering
Duke University

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

From: "loco" <[EMAIL PROTECTED]>
Subject: Re: Allowing all users to access and write to a partition
Date: Tue, 15 Aug 2000 18:47:32 -0400

After reading this thread..... and the man page, it comes to my clear view
that most linux users are fucking brainless twits who have no real desire to
prove their OS's superiority, but rather their own. I wonder how many of you
worthless bastards learned Linux totally on their own? My bet would be VERY
few of you could do anything with it until someone held your hand for a few
minutes. I don't believe for one slim second that any of you will respond
with any real help, so don't bother to respond to this post, nor any others.
I probably will never figure out how to mount a fat32 partition in
read/write mode, but that's ok. I will be proud of one thing that NONE of
you assholes can ever call yours - I am willing and able to teach anyone and
everyone what I know. I will help those less fortunate than myself. I see
lots of bantering, complaining, and otherwise whining about "stupid" posts,
but in reality, the only waste of a post is the ones who tear the poor guy a
part. I have read the man page, and my drive STILL will not load in
read/write mode because the man page is written for PROGRAMMERS and not for
LAY PEOPLE. It is always the lay person who is asking the "stupid"
questions, not the senior programmer for the local ISP. If one of you had
spent only a few seconds to type the command and explain it, we all could
have moved on by now, but alas, that would not fulfill your desire to prove
your dominance now would it? Together we might all be able to make Linux
grow, by EDUCATION and SHARING  ideas, knowledge, and abilities. As I sit
here, I remember back to when I purchased my first computer, and could find
many people who were able and willing to help me with MSDos.... maybe I
should go back to Microsoft and finally agree that Microsoft and Bill Gates
is right... they do have the superior operating system.....



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

From: [EMAIL PROTECTED]
Subject: Re: FWD: Red Hat's CFO abandoning ship.
Date: Tue, 15 Aug 2000 23:14:55 +0100

blowfish <[EMAIL PROTECTED]> did eloquently scribble:
> Yeah.  I'm paying an average of $300.00USD a month for my telephone charges too,
> plus my DSL and internet access charges from the same telco.

> If you're not paying for your access. You're leeching.

Ballcocks...
I'm helping to finance freenet with my phone charges. Without my (and all
the others) use of their service, they wouldn't HAVE any revenue.

Therefore, I'm not leeching. And OOO! Aren't you lucky, having DSL...
some of us are still stuck with normal modems.

>> Now he claims not to even know what a bot is...
>> It's a program that parses english and attempts to come back with a
>> reasonable reply. You're obviously in the pre-alpha stages of developement.

> Only humanoids and machineheads use the term "bot." ;-)

Good.... So now you're not a humanoid...
So what are you? Tentacled blob perhaps? Amoeboid lifeform?
Afterall, you can't be human, because the subset "human" falls into the set
"humanoid".
-- 
______________________________________________________________________________
|   [EMAIL PROTECTED]   | "I'm alive!!! I can touch! I can taste!         |
|Andrew Halliwell BSc(hons)|  I can SMELL!!!  KRYTEN!!! Unpack Rachel and    |
|            in            |  get out the puncture repair kit!"              |
|     Computer Science     |     Arnold Judas Rimmer- Red Dwarf              |
==============================================================================

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

From: [EMAIL PROTECTED]
Subject: Re: Linux Directory Handling
Date: Tue, 15 Aug 2000 23:39:31 +0100

Tony Lawrence <[EMAIL PROTECTED]> did eloquently scribble:
>> For example
>> 
>> If I am in the 10th sub-dir and want to go to the 4th sub-dir back and from
>> there another route...

> You mean like cd ../../../.. ?

I think he wants to go forward again as well...
So something like...

$directory=$PWD
cd ../../../..
do stuff
cd  $directory

should do it...

-- 
|                          |What to do if you find yourself stuck in a crack|
|  [EMAIL PROTECTED]    |in the ground beneath a giant boulder, which you|
|                          |can't move, with no hope of rescue.             |
|Andrew Halliwell BSc(hons)|Consider how lucky you are that life has been   |
|           in             |good to you so far...                           |
|    Computer Science      |   -The BOOK, Hitch-hiker's guide to the galaxy.|

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


** 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