LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to remove warning when netstat -anp used by non-root user ? (http://www.linuxquestions.org/questions/linux-server-73/how-to-remove-warning-when-netstat-anp-used-by-non-root-user-4175429136/)

sterin501 09-26-2012 11:31 AM

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 ?

arun5002 09-27-2012 04:57 AM

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 .

arun5002 09-27-2012 06:34 AM

@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.)

sterin501 09-27-2012 10:51 AM

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

chrism01 09-27-2012 08:05 PM

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.


All times are GMT -5. The time now is 05:02 AM.