Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22
Im running Fedor12 on virtualbox for the first time. Im having problems using sudo. It returns that "Tsquad is not in the sudoers file. This incident will be reported." Tsquad ...
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    80

    Fedora 12 sudo help

    Im running Fedor12 on virtualbox for the first time. Im having problems using sudo. It returns that "Tsquad is not in the sudoers file. This incident will be reported."

    Tsquad is the only user on that VM, i dont get why its doing this. I use sudo in ubuntu all the time with no problems, this is my first time with fedora tho.

  2. #2
    Linux Enthusiast L4Linux's Avatar
    Join Date
    Sep 2008
    Location
    Greece
    Posts
    584
    Ubuntu uses sudo by default, while Fedora doesn't.
    So you need to add yourself in the sudoers file.

    Configuring SUDO

    Basically, it says to type in terminal:
    Code:
    su --login -c 'visudo'
    and below the line root ALL=(ALL) ALL
    add the line
    Code:
    tsquad ALL=(ALL) ALL

  3. #3
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    This will make you an "Administrator", using your password. I feel that it will make your system less secure, as you will now have two accounts that have root access. Ubuntu gets around this by not having a root account.

    If you just want to be able to run commands with root privileges, this can be done using the su -c prefix, and then surrounding the command with single quotes.
    Code:
    su -c 'yum install mplayer'
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

  4. #4
    Just Joined!
    Join Date
    Jan 2010
    Posts
    80
    Quote Originally Posted by waterhead View Post
    This will make you an "Administrator", using your password. I feel that it will make your system less secure, as you will now have two accounts that have root access. Ubuntu gets around this by not having a root account.

    If you just want to be able to run commands with root privileges, this can be done using the su -c prefix, and then surrounding the command with single quotes.
    Code:
    su -c 'yum install mplayer'
    Ok, im all for security so i wont be doing that. So what your saying here is that

    Code:
    su -c
    takes the place of sudo? in the case of going from ubuntu to fedora?

  5. #5
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    It doesn't take the place of sudo. It is a way to run a command with root privileges, on systems that have a root account. It will ask for the password after you enter the command. It will want the root password.

    When sudo is enabled, you will use your own user password.
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

  6. #6
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i disagree that it is any less secure, unless your user or root password are not very strong it shouldn't matter either way

    you can configure sudo to ask for root password instead of user password if you like, the problem with su - c is that every time you do it it asks for password, if you are executing a bunch of commands in a row this is annoying, sudo has a timeout where it lets you execute stuff without being prompted over and over, but then again, if you need to execute lots as root, just su - or sudo su - then logout the root

  7. #7
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    I never said it was better, just another way. Ubuntu's popularity has skewed people's expectations on how to do things with root privileges. I enabled sudo for my account on my Fedora 12 install. I disliked it and removed it. I prefer the su -c method, or just using su. Since my account wasn't intended to be a root account, I did use a less secure password. And, I have it automatically logging me in at boot. I know, not good if you really want to be secure!

    There is a reason that regular Linux users are not automatically granted administration rights, like windows does. Since it was developed as a multi-user system, you don't want everybody mucking around with the system.

    This is less important on a single-user system, yet it is always important to use and practice secure procedures.
    Last edited by waterhead; 01-16-2010 at 12:42 PM. Reason: corrected su command
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

  8. #8
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    Quote Originally Posted by coopstah13 View Post
    ...you can configure sudo to ask for root password instead of user password if you like...
    This is what I was trying for, but didn't realize that it was possible.

    I found info on doing this on the Archlinux wiki. After adding your user to the sudoers file, you add another line in the section that contain all of the "Defaults" parameters:
    Code:
    Defaults     rootpw
    Now when you use sudo, it will want the root password. I think that this is acceptable, as it keeps the separation of root and user. It also should feel familiar to Ubuntu users.

    I might suggest this method in the future, to users with the same problem. Anyone see any drawbacks to this?
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

  9. #9
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    I don't really see any, as long as you have a nice strong root password it should be fine. Even having a weaker password for regular user still only compromises your own files.

  10. #10
    Just Joined!
    Join Date
    Jan 2010
    Posts
    80
    This is great info guys, thanks alot.

    Im looking to get the most out of linux knowledge wise. Now out of these ways, are there any that will go the same for other distros as well?

    waterhead: If i were to do what you said and make it so that sudo asks for my root account pw and not my user account pw, what is my root pw then? The only pw i remember setting up is the one for my user Tsquad. Would they be the same? If thats the case, how can i go about changing the root pw so they are not the same.

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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