Find the answer to your Linux question:
Results 1 to 10 of 10
Hi, I'm kinda new to Linux my problem is when I'm trying to run tshark on my server i get the following message : Running as user "root" and group ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    2

    Running as user "root"....


    Hi,
    I'm kinda new to Linux

    my problem is when I'm trying to run tshark on my server i get the following message :
    Running as user "root" and group "root". This could be dangerous.

    what this message mean ?
    and how can I removed it from showing every time I run tshark
    I was logged in as root.

    tnks

  2. #2
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Quote Originally Posted by shlado View Post
    what this message mean ?
    It means you shouldn't run tshark as root.
    and how can I removed it from showing every time I run tshark
    Don't log in as root
    I was logged in as root.
    You need to create another user to run as.

    More seriously though (and I apologise for the sarcasm above) it is a bad idea to run as root. root is your system account and should only be used for system-wide maintenance. It is a terrible idea as you are allowing any mistake you make to be serious enough to take down the whole system. One buggy application can kill or freeze your PC. Also root is at a much higher level than even Administrator is in Windows. Remember that most exploits execute as the running user, so if you run as root you are opening up your system to the maximum possible damage.

    As general practice you should create an everyday user and log in as that. Never log in graphically as root and try to only run root commands using sudo or su -.

    If any of this is a bit confusing please do ask. I'll be happy to help as most people here will be. Let's just call the 'logging in as root' lesson the most important one

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Welcome to the forums!

    Yep, running Linux as root user is probably the worst habit you can get yourself into, in my opinion. Time to start running a normal user account and then su'ing to root, or use sudo. I probably haven't logged in as root user in at least the last 5 years, and have had no need to do so.

    Best of luck with it.
    oz

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Feb 2008
    Posts
    26
    I have the exact opposite problem. when I start up Linux. It's set to go right to the 'guest' account. but after a few minutes, it says "$home/guest folder is full. cannot login as guest"

    anyone have any ideas?

  6. #5
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Probably the easiest thing to try is to login as root, switch over to the full guest directory, and start doing some house cleaning. You probably have some files and such in there that you could do without.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  7. #6
    Linux Enthusiast Manchunian's Avatar
    Join Date
    Dec 2007
    Location
    France but my heart stays in Britain
    Posts
    675
    You don't need to log in as root to do that. Remeber that just logging in when you're root can cause damage. This is because X can send parametres that can damage the system. This is why most distros won't even let you run a graphical text editor as root, yet alone log in as root.
    To move things, exectute the following commands:

    Code:
    mv /old_location/your_file /new_location
    or, if it's a directory:

    Code:
    mv -r /old_location/your_directory /new_location/
    Alternatively, you can copy then remove. I prefer this because if you make a mistake you can rectify later:

    To copy a file:

    Code:
    cp /old_location/your_file /new_location

    To remove a file:


    rm /old_location/your_file
    To copy a directory:

    Code:
    cp -r /old_location/your_directory /new_location

    To remove a directory


    Code:
    rm -r /old_location/your_directory

    You can only execute these commands as root - failure to do so will result in a permissions error. Double check before you press enter that you haven't made a mistake - especially when deleting - you won't be asked "Are you sure?" Probably the safest way to do this, at this stage, is to drag and drop the file or directory into the console. Konsole (the default Kde terminal) gives you some choices when you do this, including pasting only, copying and moving.
    Don't get into the habit of logging into root - even to do temporary or important tasks like this one. If you do, you'll do it again and again, and one day you'll have a problem. Note also that one of the reasons (but not the only reason) why Linux and other Unix OSs are more secure than Windows is because these systems have a separate root account for admin tasks, whereas in Windows most people are permanently working as administrations
    Distribution: Archlinux
    Processor: 3 x Amd 64 bit
    Ram: 4 GB
    Graphics card: Nvidia GeForce 9800 GT

  8. #7
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    I didn't even think of just moving the directory That would be a far safer option than mine. Thanks, Manchunian!
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  9. #8
    Just Joined!
    Join Date
    Feb 2008
    Posts
    26
    the thing is, I didn't save anything in the guest folder. I had just installed it and like it. I came back about a week later and it was giving me this error message.

    I installed it on an external hdd and tried it on a different computer and it wouldn't boot. I have a feeling that the failer to boot started this whole error stuff.

  10. #9
    Just Joined!
    Join Date
    Jun 2008
    Posts
    2
    I understand the importance of not login as root. but is there still a way to remove this message ?
    I got some other PCs that does not show this message though Im login as root

  11. #10
    Just Joined!
    Join Date
    Jun 2009
    Posts
    1
    This is all a fascinating discussion, but no one seems to have answered shlado's original question.

    The reason you get the error message is because by default tshark has its user and group both set to "root". Whether one logs in as root or executes via "sudo" is completely irrelevant to the problem at hand: you will get the error message either way. To fix:

    1. change the tshark group to something OTHER than root (maybe make up a new one)

    2. Set the suid (as root): "chmod u+s /usr/sbin/tshark"

    3. Make sure your normal user account is allowed to run tshark in the /etc/sudoers file (as root: "visudo")

    4. As normal user, execute "sudo /usr/sbin/tshark"

Posting Permissions

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