Re: ifconfig??

From: Moe Trin (ibuprofin_at_painkiller.example.tld)
Date: 04/01/05


Date: Thu, 31 Mar 2005 16:14:54 -0600

In article <pan.2005.04.01.12.42.09.83727@gmail.com>, Scorp123 wrote:
>On Fri, 04 Mar 2005 12:13:04 -0800, Perfect Reign wrote:

A little slow on the responding? ;-)

>They are not in your $PATH environment variable. The command shell
>will only look for programs in /sbin when you are logged in as "root", a
>normal user has no business starting programs from there. "sbin" stands
>for "Superuser's BINaries", so that's why :-)

http://www.pathname.com/fhs/

No - the Filesystem Hierarchy Standard infers the S is System. See section
3 of that document. The /sbin directory is not part of the original UNIX,
but was added in System V Release 4 (SVR4) as a common place to stash
system binaries. Another definition indicated this was where statically
compiled binaries were to be placed. Normal users may have need for some
of the commands in /sbin/ - certainly as a network administrator, I'm
constantly using /sbin/arp, /sbin/ifconfig and /sbin/route to read the
contents of the arp table, network interface statistics, and the routing
table respectively.

>> As regular user...
>>
>> kai@yoda:~> /sbin/ifconfig
>> bash: /sbin/ifconfig: No such file or directory
>
>Yeap. As I said, you probably don't have it in your $PATH variable and
>hence your shell never looks for "ifconfig" inside the "/sbin" directory.

Nope - PATH has nothing what-so-ever to do with that. He provided the
full path to the command in the command line, so the PATH environment was
not consulted. 'man bash' and look at the section 'COMMAND EXECUTION'.
Here, the shell is saying that the file doesn't exist (if it existed and
he had no execute permission, or no permission to the /sbin/ directory,
he should get the error "bash: /sbin/ifconfig: Permission denied" instead).
Try it and see.

        Old guy



Relevant Pages

  • Re: find the exact path to execute???
    ... >i`m implementing a shell, i`m having problems with finding the the exact ... If the command name contains any '/' characters, ... execute permission then it will return an error. ...
    (comp.unix.shell)
  • Re: du command failing
    ... directory if the directory does not have a Read or Execute permission. ... From UNIX command line i have executed 'du' command. ... From [exec] manpage: ...
    (comp.lang.tcl)
  • Re: add command
    ... Segin wrote: ... > myfreedom wrote: ... >> distiguish it as a command not just file so when i write it exexute? ... > Each file as execute permission bits on it. ...
    (comp.os.minix)
  • Re: xp_cmdShell
    ... A severe error occurred on the current command. ... I have user with read permissions on my tables and execute permission on my SP. ... In SP(owner is DBO) I update table, and on update the trigger is fired witch write some data into the text file in my disk. ... I get an error message: ...
    (microsoft.public.sqlserver.programming)
  • [UNIX] OpenBB Multiple Vulnerabilities (board.php, search.php, member.php, post.php, myhome.php, ind
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... arbitrary command execution. ... snippet of code from one of the vulnerable scripts is presented ...
    (Securiteam)