Harry Putnam wrote:
> I'm noticing a problem using sudo where the builtin cd command is not
> known under sudo.
> 
> User attempts to `ls dir', receives `permission denied' ( its a root
> owned dir)
> 
> User uses `sudo ls dir', and is queried for password, sudo then prints the
> ls display when password is supplied.
> 
> All good so far.
> 
> Now user attempts to use sudo to cd into dir:
> 
>    sudo cd dir
>   sudo: cd: command not found
> 
> Far as I know `cd' is a shell builtin.  Why doesn't sudo environment
> know about it?  Does sudo envoke a different shell that lacks that
> built in..?

as far as i know, sudo doesn't invoke shell to execute the commands,
istead it executes them directly (because of security reasons it checks
a few thing)


-- 
      _
      |
YoYo () Siska
===================
http://www.ksp.sk/

-- 
gentoo-user@gentoo.org mailing list

Reply via email to