LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-26-2012, 12:31 PM   #1
sterin501
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Rep: Reputation: Disabled
How to remove warning when netstat -anp used by non-root user ?


Hi ,

Currently I am getting warning when netstat -anp is used by non admin user , how to remove that ?

[sterin@sterin-lap ~]$ netstat -anp | grep 7001
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)


I dont want that warning message . Is there any way to remove it ?
 
Old 09-27-2012, 05:57 AM   #2
arun5002
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 549
Blog Entries: 5

Rep: Reputation: Disabled
hI

Quote:
Currently I am getting warning when netstat -anp is used by non admin user , how to remove that ?
Enable sudo permission for user sterin .
 
Old 09-27-2012, 07:34 AM   #3
arun5002
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 549
Blog Entries: 5

Rep: Reputation: Disabled
@Hendri2201 --I read the link you had posted for sterin501.The link you had posted is something unrevelent to these topic.Dont mess the user with irrevelant post


sterin is facing out problem since he does not have root priviledge or (sudo priviledge) to execute the below command .

[sterin@sterin-lap ~]$ netstat -anp | grep 7001
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
 
Old 09-27-2012, 11:51 AM   #4
sterin501
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
arun,

I am running command from script . If i give sudo , I have to enter password for it . Script wont work properly then .

Thanks
Sterin
 
Old 09-27-2012, 09:05 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,311

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
If you really need to, you can specify NOPASSWD in sudo, but definitely list the specific cmds you want enabled; don't use 'ALL'.
You could also try adding the user to the group that owns netstat, or try an ACL for a more fine-tuned approach.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
netstat -anp is not giving the pid/process_name! vamsi9042 Linux - Networking 2 11-08-2011 11:32 PM
Remove user from root group JJJCR Linux - Newbie 5 09-05-2011 09:36 PM
Netstat issues 'warning, got duplicate tcp line' English_Man Linux - Networking 5 04-13-2009 04:07 AM
cannot remove netstat SPEEDEX Linux - Newbie 3 08-13-2007 09:20 AM
warning:user mock build doesn't exist-using root ??? IndianMaverick Fedora 1 09-30-2006 08:13 AM


All times are GMT -5. The time now is 01:16 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration