Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
Hey everyone. I'm a very new user to Linux but I'm trying to learn. I installed CentOS on my Lenovo T420 and now I'm thinking it might not be a ...
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    10

    CentOS bootloader and sudo

    Hey everyone. I'm a very new user to Linux but I'm trying to learn. I installed CentOS on my Lenovo T420 and now I'm thinking it might not be a good idea as there is a lot of proprietary software that runs my thinkvantage key and my function keys.

    Anyways, just to do some basic things, I noticed that bootloader shows CentOS and my windows 7 installation which is labeled "Other". I want to make the booatloader auto load windows 7 first and I want it to say Windows 7 and not Other.

    I typed "sudo /boot/grub/menu.lst" I think it was to get to the file as I read 0,1,2...etc changes the boot order. Well, it says that my user name is not in the sudo list or something of that nature. How do I add myself to do sudo commands?

    After I can add myself to sudo, change the bootloader order and description, I'll be back to ask a ton more questions.

  2. #2
    Super Moderator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,145
    Hello and Welcome.
    I do not think CentOS uses sudo by default. Try just using the su - command or gksu
    Code:
    su -
    enter password and notice they do not echo on screen but just keep typing and hit enter when done. Also notice the hyphen -, it's important if you want full root priviledges and paths.
    or
    Code:
    gksu
    You can also use su -c to issue one or more commands and exit back to the normal user
    Code:
    su -c "some command"
    (password)
    For more info on su - and gksu
    gnome-sudo - What is gnome-sudo
    su (Unix) - Wikipedia, the free encyclopedia

    EDIT:
    For info on changing GRUB options, see this link.
    9.7.*GRUB Menu Configuration File
    Last edited by MikeTbob; 10-30-2011 at 02:25 AM. Reason: See EDIT:
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

  3. #3
    Super Moderator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,145
    I just thought of something else but I'm not sure if CentOS does this for you or not. Normally, new users may only su - to root if they belong to the wheel group. To add a username to the wheel group, issue the following command as root:
    Code:
    gpasswd -a username wheel
    Of course you need to substitute your real username in the above command.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

  4. #4
    Just Joined!
    Join Date
    Oct 2011
    Posts
    10
    Can you explain what wheel is? I guess I forgot to mention that everything must be explained as I'm extremely new to this.

  5. #5
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,071
    Hi there.

    Basically, the 'wheel' group is a group which limits the number of people who are able to su to root.
    Nothing more than that.
    Some distros have wheel preconfigured, while others do not.
    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.

  6. #6
    Just Joined!
    Join Date
    Oct 2011
    Posts
    10
    Ok, I tried all the commands listed and nothing worked. Anything else to try?

    "su -c" gives me an incorrect password though its right.
    "gksu" gives me a command not found
    "sudo" gives me "username" is not in the sudoers file

    I did add myself to wheel but it was "usermod -G wheel <username>" that I had to use
    Last edited by brittonal; 10-30-2011 at 12:55 PM.

  7. #7
    Just Joined!
    Join Date
    Oct 2011
    Posts
    10
    I tried to just use su and I logged in with the roots password and it works. Now I'm having another problem. When I navgiate to /boot/grub/menu.lst it tells me permission denied.

  8. #8
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,943
    CentOS is designed to be used as a server so if you are not planning to use it as such, you may be better off trying another distribution. You can go to the distrowatch site which has a lot of information on Linux distributions with links to their sites where you can get more information.

    If you use su, enter your password and "it works", how do you then get permission denied. Are you opening a text editor from the terminal? That's what you would need to do. I don't use CentOS so I'm not sure which text editors it uses. You might try in a terminal gedit /boot/grub/grub.conf to see if that opens the grub.conf file. I believe the menu.lst file is just a link to grub.conf.

  9. #9
    Just Joined!
    Join Date
    Oct 2011
    Posts
    10
    Yancek, that worked. Thank you. I wasn't using gedit which I assume is a linux file or word editor like notepad from windows. I'm a super noobie at this as you can see. Your right, maybe I shouldn't be using CentOS. I knew it was mainly for servers but the installation has a desktop installation so I tried that.

    Now lets edit this file and see what I come up with.

  10. #10
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,071
    Quote Originally Posted by brittonal View Post
    I tried to just use su and I logged in with the roots password and it works. Now I'm having another problem. When I navgiate to /boot/grub/menu.lst it tells me permission denied.
    Here's a little something for you... using su will log you into the root account, but you won't have complete and full permissions.
    However, if you use su - (notice the dash) you'll have full access to everything.
    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.

Page 1 of 2 1 2 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
  •  
...