This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to run wireshark as a non-root user while logged in as a root user?

0

Hey,

I am new to arch linux and wireshark. Its a noob question i know, but jsut wanted to know. Basically, i am using arch linux with Linux kernel 4.2.2. I have downloaded and installed wireshark as a root user using pacman. Additionally i made a new non-root user (username: wiresharktest) and added it to the default wireshark group. I have limited the permissions only to the root user and users in the wireshark group.

Now i wanted to know if i can run wireshark as a non-root user (username: wiresharktest) while I am logged in as root. Is it possible? If yes, How?

Thanks in advance.

asked 13 Oct '15, 14:51

archskynet's gravatar image

archskynet
6112
accept rate: 0%


One Answer:

0

Now i wanted to know if i can run wireshark as a non-root user (username: wiresharktest) while I am logged in as root.

Please try this:

su -l wiresharktest -c /usr/bin/wireshark

Please replace the path to Wireshark with the path on your system.

Regards
Kurt

answered 13 Oct '15, 15:00

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

su -l wiresharktest -c /usr/bin/wireshark-qt wireshark-qt: cannot connect to X server. :( I'm sorry if i am going in a wrong direction, you can ask me to refer any instructions which i may understand first, rather than blindly asking here. I understood that running an X server is required for displaying programs from su. I read it that i can create a symlink. Please Explain.

(13 Oct '15, 15:30) archskynet

Do you have a graphical interface on your OS, or is this a pure "server installation" with ssh/telnet access?

(13 Oct '15, 16:42) Kurt Knochner ♦

Hey, I do have a GUI for my OS. And this is not a server installation. It works if i start wireshark-qt from terminal , and I can login as a non-root user as well, but cannot start a the application as a non-root user from root.

(14 Oct '15, 07:44) archskynet

but cannot start a the application as a non-root user from root.

Then you should follow the dscriptions in the following question, recently asked:

https://ask.wireshark.org/questions/46504/how-to-set-environment-variables-in-kubuntu

(14 Oct '15, 07:49) Kurt Knochner ♦