LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-10-2011, 01:02 PM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
Host equivalent for the users (non root)


Hello

host xx.xx.xx.xx gives the DNS lookup of the IP given.

However it requires the root permissions. Is there an equivalent using netstat or other, for the users.
(I would not like to use sudo at all to let users have same tool as host)
Code:
$ host -version
host: illegal option -- e
Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]
            [-R number] [-m flag] hostname [server]
       -a is equivalent to -v -t ANY
       -c specifies query class for non-IN data
       -C compares SOA records on authoritative nameservers
       -d is equivalent to -v
       -l lists all hosts in a domain, using AXFR
       -i IP6.INT reverse lookups
       -N changes the number of dots allowed before root lookup is done
       -r disables recursive processing
       -R specifies number of retries for UDP packets
       -s a SERVFAIL response should stop query
       -t specifies the query type
       -T enables TCP/IP mode
       -v enables verbose output
       -w specifies to wait forever for a reply
       -W specifies how long to wait for a reply
       -4 use IPv4 query transport only
       -6 use IPv6 query transport only
       -m set memory debugging flag (trace|record|usage)
thanks
 
Old 03-10-2011, 01:09 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
By default, host is not restricted to root. You could always chmod host to give execute permissions to standard users.
 
1 members found this post helpful.
Old 03-10-2011, 01:14 PM   #3
jcalzare
Member
 
Registered: Aug 2009
Location: Chicago
Distribution: CentOS
Posts: 114

Rep: Reputation: 34
I think you are misunderstanding the output you see there. You typed host -version, and it's displaying an error about a -e option that you didn't use. It's linking -v with -e from the word 'version'.

Anyway, in case I'm misunderstanding you, you can get the same results with the dig utility.
 
Old 03-10-2011, 10:30 PM   #4
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by jcalzare View Post
I think you are misunderstanding the output you see there. You typed host -version, and it's displaying an error about a -e option that you didn't use. It's linking -v with -e from the word 'version'.

Anyway, in case I'm misunderstanding you, you can get the same results with the dig utility.
thank you very much. Host indeed works now, I have no idea what was the problem.
I did also nmap to seek my pc, and nmap requires root right?
 
Old 03-10-2011, 11:08 PM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Nmap requires root only for certain flags and arguments. You can run nmap with a standard user, but you can't use all of its feeatures.

Josh
 
  


Reply



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
How to get an motd (or equivalent) to users of gdm? pcardout Linux - Server 2 09-19-2007 12:14 AM
LINUX host ics service equivalent can it be done sierhuis Ubuntu 1 03-15-2007 02:42 PM
root equivalent user... ksraju007 Linux - Security 7 07-01-2006 03:43 AM
Root Host or trusted host???? astro209 Linux - Security 1 12-01-2005 02:56 PM

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

All times are GMT -5. The time now is 08:34 PM.

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