function privileges

Discussion in 'Perl Misc' started by Mr Bob, Mar 29, 2005.

  1. Mr Bob

    Mr Bob Guest

    Hi, I'm wanting a user script to use Net::ping to send an icmp packet but
    can't because of privileges, is there anyway I can get around this?. I
    guess an alternative is to use system("ping -c 1 $host"); or whatever, but
    I'd rather not.

    Thanks.

    NB: Noob.
     
    Mr Bob, Mar 29, 2005
    #1
    1. Advertising

  2. Mr Bob

    Keith Keller Guest

    On 2005-03-29, Mr Bob <> wrote:
    > Hi, I'm wanting a user script to use Net::ping to send an icmp packet but
    > can't because of privileges, is there anyway I can get around this?


    Yes--it's in the docs for Net::ping, in the paragraph that describes
    what happens whe you specify icmp as the protocol.

    > I guess an alternative is to use system("ping -c 1 $host"); or whatever, but
    > I'd rather not.


    Again, reading the Net::ping docs, you can try to install and use
    Net::ping::External, if you don't want to use system().

    --keith

    --
    -francisco.ca.us
    (try just my userid to email me)
    AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
    see X- headers for PGP signature information
     
    Keith Keller, Mar 29, 2005
    #2
    1. Advertising

  3. Mr Bob

    Guest

    Mr Bob <> wrote:
    > Hi, I'm wanting a user script to use Net::ping to send an icmp packet but
    > can't because of privileges, is there anyway I can get around this?. I
    > guess an alternative is to use system("ping -c 1 $host"); or whatever, but
    > I'd rather not.


    Assuming the privileges you mean are concerned with the installation of
    Net::ping, then in the same directory as your script create a directory
    called Net and place a copy of the Net::ping source code from CPAN in
    that directory (with the filename Ping.pm).

    Then assuming all else is fine, this should be picked up by your script
    since the directory . should be in @INC.

    In the unlucky event that the problem is caused by lack of network
    privileges (as some networks do not allow ICMP traffic) then the
    solution is probably buying the system and network admins beer.

    Axel
     
    , Mar 29, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Nassar

    Debugger privileges for ASP.NET

    Tony Nassar, Jan 26, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    1,722
    Tony Nassar
    Feb 12, 2004
  2. Shalini
    Replies:
    1
    Views:
    335
    Hernan de Lahitte
    Mar 5, 2004
  3. Matthew Smith

    Developer Account Privileges

    Matthew Smith, Jul 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    343
    Bryant Hankins
    Jul 19, 2004
  4. =?Utf-8?B?c2hlZmFsaQ==?=

    HTTPHandler to create, write file and account privileges

    =?Utf-8?B?c2hlZmFsaQ==?=, Dec 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    371
    =?Utf-8?B?c2hlZmFsaQ==?=
    Dec 2, 2004
  5. Lee Gillie
    Replies:
    1
    Views:
    849
    Ken Cox [Microsoft MVP]
    May 13, 2005
Loading...

Share This Page