[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [sudo-users] How to disable ( deny ) user to change the password of root



On Thu, 2008-11-20 at 17:25 +0800, edwardspl ita org mo wrote:
> Would you mind to tell me what different between "passwd" and 
> "/usr/bin/passwd" ?

If you administer a Unix/Linux system, it essential that you understand
this. Even if you're only a user, it's highly relevant.

Typing "passwd" at the Shell command prompt (or equivalently, in a
script) tells the Shell to look for an executable file called "passwd"
in a series of directories defined by the $PATH variable. The first one
it finds, it executes. If the $PATH variable has been altered to put
some sneaky directory ahead of /usr/bin in the list the Shell will
search, that's what gets executed.

On the other hand, "/usr/bin/passwd" means exactly that file, with no
ambiguity.

BTW, this is why it's strongly recommended not to include "." as a
member of your $PATH. Think about it ...

poc


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]