[sudo-users] Problem with CD command while using sudo

Mousumi Kadham mousumi at india.hp.com
Fri Jul 29 09:35:47 EDT 2005


 
Hi ,

Here is the situation. There are certain commands to be executed, files to
be edited in a protected directory which has a long path. Without sudo and
every one using root, administrators simply will do cd to the final
directory and do many things like editing a few files etc. However with
sudo, for every command, a long path has to be given and can quickly become
very irksome to the administrators. Hence the question about 'cd' with sudo.

Pls. help.

Regards,
Mousumi



-----Original Message-----
From: Russell Van Tassell [mailto:russell+sudo-users at loosenut.com] 
Sent: Friday, July 29, 2005 12:20 PM
To: Mousumi
Cc: sudo-users at sudo.ws
Subject: Re: [sudo-users] Problem with CD command while using sudo

On Tue, Jul 19, 2005 at 11:51:07PM +0530, Mousumi wrote:
> Hi,
> 
> I have installed sudo in one of the machines and configured various
groups.
> In the visudo file, cd is listed as the command which can be used by 
> all the groups. When executed cd under sudo, change directory does not 
> happen. No error is reported, but the directory does not change. Any 
> thoughts on how to resolve this issue?

In some shells, cd is an instrinsic, and in others it is a shell script
which simply changes the cwd variable or some other PFM.  Why, however,
would you need to make cd a "sudo" command?  Wouldn't "ls" or something else
be a little more useful? (someone that cd's in to a directory that they
aren't normally able to still won't be able to read it - so it's pretty
useless, IMO)


--
Russell M. Van Tassell
russell at loosenut.com

"There are no significant bugs in our released software that any
 significant number of users want fixed"                    - Bill Gates






More information about the sudo-users mailing list