Results 1 to 3 of 3

Thread: Wireshark automatically start with sudo

  1. #1
    Join Date
    Oct 2008
    Beans
    122

    Smile Wireshark automatically start with sudo

    Hi, I am trying to use wireshark on my ubuntu 10.10 laptop.

    However I have found out that wireshark will only detect my network cards when it is started with root permissions.

    How would I make it automatically start with root permissions?

  2. #2
    Join Date
    Apr 2008
    Beans
    451
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Wireshark automatically start with sudo

    you can get rid of the password prompt, if you add a NOPASSWD ruleset for wireshark to your /etc/suoders file:

    Here's a first guide how you set it up:

    http://help.ubuntu.com/community/Sudoers

    Be careful, always use the visudo command to edit the file (instead of gedit or kwrite) - visudo will parse the content before /etc/sudoers is stored. So you can't safe a file with invalid content sudo won't understand.

    Nevertheless it's quite easy to mess up a system, if the file is not properly set up.

    Here's the basic idea of the rule you would like, put it at the bottom of /etc/suoders using the visudo command:

    Code:
    DanHorniblow ALL=(ALL) NOPASSWD:/usr/bin/wireshark
    Meaning:
    The User DanHorniblow
    on *any* host as *any* user [that's what ALL=(ALL) is]
    can run without a password /usr/bin/wireshark

    Make sure the rights of /usr/bin/wireshark are set to 0755, so no one but root can replace it to gain root access to your system.

    You can set up more complex rulesets but that's up to you to find out

    No you should be able to start wireshark with sudo /usr/bin/wireshark, without the password prompt

  3. #3
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,628

    Re: Wireshark automatically start with sudo

    Go into Main Menu aka Alacarte and find wireshark and add "gksudo" to the beginning of it.

    Or just start it from your terminal with "gksudo wireshark"

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •