change drive

Matthew S-H mathbymath at aol.com
Wed Apr 20 11:28:15 UTC 2005


On Apr 20, 2005, at 4:07 AM, ZIYAD A. M. AL-BATLY wrote:

> On Tue, 2005-04-19 at 07:51 -0400, Matthew S-H wrote:
[snip]
>> Also, when you run sudo, a few commands are not available, such as
>> "cd".  This is because they would pose a security risk.
> Changing your working directory with "cd" alone is not a security risk,
> what comes after that is, but I've read your whole message and I see
> were are going. (This paragraph is for Matthew, so anybody who doesn't
> understand a thing of it just ignore it.)
[/snip]
Well, that is true.  It is not cd that the debian-folk were trying to 
block by not allowing the commands that are internally integrated in 
bash (the word that is normally used to describe them seems to 
mysteriously escape my mind, but I think you probably know what I 
mean).  There are other commands that are included, however, that would 
pose a threat.  And the simplest way to block them was to not allow 
sudo to access them.  On the other hand, they could have made a simple 
executable for cd.  But this would be incorrect, as cd is 
shell-specific (i think).  Although any modern shell (such as bash, 
csh, sh, etc.) has support for cd, not all of the older ones did.  Some 
of them used different means for changing directories.  Plus, there was 
no need to find a work-around for this because you can just as easily 
"cd" to a directory without using root.
[snip]
> But, in my opinion, telling what actually is happening is a better way 
> for the user to understand the system and guarding him/her self from 
> bad things.  Yes, your replay is much better as it tells Sara what she 
> actually wants and which is a much help for her than my replay.
[/snip]
I see your point.  The only thing is that it might be helpful if you're 
going to tell her why it happens to tell her how to get around it.  
Otherwise, its useless knowledge.  Erm....no knowledge is useless, but 
you get the point.
[snip]
>> I have been using Linux regularly for almost 6 months, and I still
>> don't know how to change the PATH for root.  I probably could figure
>> it out pretty easily, but I just don't feel like it.  And I actually
>> don't even know how to ACTUALLY change the PATH for any user.  I have
>> been cheating by changing it in "~/.bashrc" whenever I run terminal.
> You were cheating yourself!  As that *is* the *correct* way to change
> the PATH for a user!  You were doing better than you expected from
> yourself, that's all.
[/snip]
Ooopsies.  YAY!  I solved a problem by myself and never knew it....
But I am not quite sure that you/I was right.  "~/.bashrc" is only 
executed for interactive shells (I think---correct me if i'm wrong).  
And therefore, your PATH is only changed for interactive shells.  For 
some scripts, which might benefit from a changed PATH, it would cause a 
problem.


~Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2925 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050420/59e94b2b/attachment.bin>


More information about the ubuntu-users mailing list