Results 1 to 9 of 9

Thread: nmap install question

  1. #1
    Junior Member
    Join Date
    Jul 2003
    Posts
    29

    nmap install question

    I've used nmap for a while now and recently upgraded to 3.45 heres the problem I can use nmap as a normal user however when i log in as root i can't get nmap to open?? with a bash shell i type nmap and voila not so when i'm root. any thoughts? anyone else experience this? i would appreciate any advice thankes alot!
    Windows geht.net Enterprise Sever

  2. #2
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    that's wierd. On mine I can only run it as root. It's probably the permissions.
    cd into the /usr/bin directory and check the permissions on nmap using ls -al.
    There will probably be a ton of files here. I don't know how to get it to list them a page at a time.
    you should probably chmod it to 744 or maybe 755.
    my nmap is as follows
    owner permissions read write execute
    group permissions read execute
    others permissions read execute

    but I can only run it as root. I would say do this command in the /usr/bin directory.
    chmod 755 nmap
    then if your comp is like mine you should only be able to run it as root.
    good luck.

  3. #3
    I assume from your post that nmap doesn't launch when you just type 'nmap' ?
    How about when you specify the whole path to nmap '/usr/bin/nmap' ?
    I'd try that before you start playing with permissions...

    Anyhow my permissions are as follows:
    drwxr-xr-x 3 root root 34328 Aug 22 14:46 bin
    -rwxr-xr-x 1 root root 343812 Apr 28 20:43 nmap

  4. #4
    rebmeM roineS enilnOitnA steve.milner's Avatar
    Join Date
    Jul 2003
    Posts
    1,021

    Re: nmap install question

    Originally posted here by BourneAgain
    I've used nmap for a while now and recently upgraded to 3.45 heres the problem I can use nmap as a normal user however when i log in as root i can't get nmap to open?? with a bash shell i type nmap and voila not so when i'm root. any thoughts? anyone else experience this? i would appreciate any advice thankes alot!
    What exactly happens, what error messages are displayed, what distro are you using?

    Please give as much information as possible so that we can be of help.

    Steve
    IT, e-commerce, Retail, Programme & Project Management, EPoS, Supply Chain and Logistic Services. Yorkshire. http://www.bigi.uk.com

  5. #5
    Junior Member
    Join Date
    Jul 2003
    Posts
    29
    h3r3tic "cd into the /usr/bin directory and check the permissions on nmap using ls -al.
    There will probably be a ton of files here. I don't know how to get it to list them a page at a time." h3r3tic the command to make it one page at a time would be ls -al | more and i appreciate the help i'll try that.

    To steve.milner I'm running SuSE 8.1 pro when i use bash i usualy type in nmap and it opens and if i want to run it as root i su root because we all know theres limited non root uses. after installing 3.45 i can type in "nmap" as a regular and it opens just fine but when i su root it says nmap command not found. let me know if you need more info thanks for trying to help it is very much appreciated.
    Windows geht.net Enterprise Sever

  6. #6
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,323
    I had a random thought about this..


    If you are doing su root then the appropriate PATH may not be passing over. Try using su - root or su -. The hyphen denotes that the .bash_profile is read and thus, incorporates any PATH variables over the switched user.
    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  7. #7
    Junior Member
    Join Date
    Jul 2003
    Posts
    29
    MsMittens i dont know how you do it but you are my tech GODDESS please if you would, explain to me how exactly that works? if you could post it or email me with why that works more indepth i would love to know more (feed my starving brain) i'm so happy it works forgive me if i'm rambling it's been a really long day. but thank you for your help
    Windows geht.net Enterprise Sever

  8. #8
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,323
    Hehe.. the su command by itself only switches just to the user and uses/inherits the "existing user's" profile or environment settings (i.e., their PATH variable info). If you type, as a regular user, echo $PATH you should get something like:

    mittens@MsMittens:~$ echo $PATH
    /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/opt/kde/bin:/usr/lib/qt-3.1.2/bin:.
    But, if you type su - <username> you will get the environment (ie. variables) for the new user. In the case of root (at least mine) looks something like:

    root@MsMittens:~# echo $PATH
    /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/opt/kde/bin:/usr/lib/qt-3.1.2/bin
    A few more directories as you can see. I hope that clarifies. BTW, this is particularly helpful when switching to special database users (like oracle and/or mysql). They tend to have very specialized variables for locations of various portions of the installed/to-be-installed database program.

    Hope that helps.
    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  9. #9
    Junior Member
    Join Date
    Jul 2003
    Posts
    29
    I Learn somthing new everyday!!! Thank You thats good to know!
    Windows geht.net Enterprise Sever

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •