-
-
Notifications
You must be signed in to change notification settings - Fork 909
Running nmap
nmap is a common an popular port scanning tool, used for checking for open/filtered/closed ports, both locally and externally.
On iSH, running nmap <args> <ip/domain>
will produce an error:
To get past this, we can use the steps provided by @HKTangyuan from this comment. These assume you've already installed nmap
.
adduser <user>
su <user>
- run
nmap <args> <ip/domain>
* is to be replaced with your preferred subuser
You'll still be confined by any functions that would require root privs, as well as you will have to run it as that user every single time. No Bueno!
There are additional steps that can be taken to make things a little easier.
First, lets add sudo
and this new user to wheel:
apk add sudo
echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/wheel
adduser <user> wheel
Second, lets install runuser
via apk add runuser
.
Last, we set an alias for nmap to use runuser to execute the command when still root
alias nmap="runuser -u nmap -- nmap"
Don't forget to make the alias permanent echo "alias nmap=\"runuser -u nmap -- nmap\"" >> /etc/profile
Depending on the args your use with nmap, you will still get some errors like this:
And this:
While it can be spammy and annoying, they do not seem to affect the BASIC functionality of nmap.
Copy Pasta:
adduser nmap
apk add sudo
echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/wheel
adduser nmap wheel
apk add runuser
alias nmap="runuser -u nmap -- nmap"
echo "alias nmap=\"runuser -u nmap -- nmap\"" >> /etc/profile
nmap shiggl.es -sn
- Contributing to iSH Development
- How to add a new Character Device to iSH
- How to add a new entry to /proc/ish
- Fixing hostname localhost
- Running nmap
- Running Ruby Programs
- Installing PHP with a TLS certificate and a PHP filemanager
- Installing R and any package from the CRAN
- iSH Alpine Release Issues
- Using Alpine Linux repositories
- Upgrading to a new release
- Install & Activate Alternate Filesystems