LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-27-2003, 08:49 PM   #1
psyklops
Member
 
Registered: Jan 2002
Location: Los Angeles
Distribution: RedHat 9.0
Posts: 216

Rep: Reputation: 30
nmap


Id like to run -sS without being su. Is this a matter of file permissions? How would I go about doing this?
 
Old 08-27-2003, 08:55 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
Probably best to setup sudo but I think this is actually built in to it.
 
Old 08-27-2003, 09:37 PM   #3
shellcode
Member
 
Registered: May 2003
Location: Beverly Hills
Distribution: Slackware, Gentoo
Posts: 350

Rep: Reputation: 32
TCP Syn means that nmap has to use generate raw sockets. the only user who has access to the raw socket interface is root. thus you need root.

raw sockets:
Code:
int sockfd;
sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
as an example with ICMP.
 
Old 08-27-2003, 09:44 PM   #4
psyklops
Member
 
Registered: Jan 2002
Location: Los Angeles
Distribution: RedHat 9.0
Posts: 216

Original Poster
Rep: Reputation: 30
[psyklops@MoBAP dl]$ sudo nmap -sS -p1-100 localhost.localdomain
sudo nmap -sS -p1-100 localhost.localdomain
Password:
psyklops is not in the sudoers file. This incident will be reported.
[psyklops@MoBAP dl]$

Im alittle confused on the format to allow me to run -sS without su'ing though. I cant make heads or tails of the sudoers man. Has anyone set up an sudoers files before. If so what would be the correct syntax?

Last edited by psyklops; 08-27-2003 at 10:15 PM.
 
Old 08-27-2003, 10:44 PM   #5
psyklops
Member
 
Registered: Jan 2002
Location: Los Angeles
Distribution: RedHat 9.0
Posts: 216

Original Poster
Rep: Reputation: 30
Heres a copy of my sudoers file in case anyone else gets stuck. I had problems with the format even though its pretty straight forward. : P




sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# User privilege specification
root ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
psyklops MoBAP=/usr/bin/nmap
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nmap ? how do i do nmap in linux ? command not found abbasakhtar Linux - Newbie 2 01-02-2011 01:08 AM
Nmap lgilleran Linux - Newbie 1 07-27-2005 05:50 AM
Nmap h4z Yoper 4 12-09-2004 02:09 AM
nmap -O sopiaz57 Linux - Security 3 01-04-2004 09:09 AM
nmap sopiaz57 Linux - Software 2 09-16-2003 08:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration