LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2017, 10:23 AM   #1
dj_thrive
LQ Newbie
 
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27

Rep: Reputation: Disabled
Why can't I "sudo -i"?


I have a new account set up on my system (RedHat 6 Cluster and Windows Server Domain Controller), and when I try to sudo from it, it tells me access is denied. I am the admin of this server. I imagine it's fairly simple to correct, I'm just not sure where to start. Thanks!

Last edited by dj_thrive; 01-26-2017 at 10:30 AM.
 
Old 01-26-2017, 10:28 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Contact the admin of the server is the correct "start".
 
Old 01-26-2017, 10:31 AM   #3
dj_thrive
LQ Newbie
 
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Contact the admin of the server is the correct "start".
Hi there, thanks for your time. I am the admin, so it's on me to correct this. I am trying to minimize having to log in as root, since it's a secure system.
 
Old 01-26-2017, 10:45 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Hello Back!

I can only suggest one or both of these may assist you.

Sudo: you're doing it wrong - PDF @ 171 pages.
Sudo: you're doing it wrong - YouTubeVid @ 1h:11m

First thing that comes to mind is
Code:
visudo
and /var/log/auth.log or similar(s)...

Wish it was "more".
 
Old 01-26-2017, 12:48 PM   #5
mpalumbo
LQ Newbie
 
Registered: Jan 2017
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by dj_thrive View Post
Hi there, thanks for your time. I am the admin, so it's on me to correct this. I am trying to minimize having to log in as root, since it's a secure system.
have you configured the user account to be part of the wheel group or edited the /etc/sudoers file to include that user account?
 
2 members found this post helpful.
Old 01-26-2017, 02:02 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,521

Rep: Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619
redhat by Default! dose not set up and use "sudo"
the default is " su " and " su - "

for sudo you have to set it up to be used

read the redhat admin guide on the redhat web site
https://access.redhat.com/documentat...ide/index.html

and for a cluster
https://access.redhat.com/documentat...ion/index.html

also this is Redhat so you do have the required support contract
use it

the first step is the "knowledge base "
login to the redhat site with the credintials you set up when you bought the license
and search ( you will need to be loged in to read MOST of the web site )

https://access.redhat.com/search/#/knowledgebase



.
 
1 members found this post helpful.
Old 01-26-2017, 02:32 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138
What John VV said

Ubuntu and its derivatives are the only distros that grant the first user on the system unlimited sudo privileges and lock out the root account. Other distros don't do that, for good reason.

Use the root account to administer a RH system, you can switch to it with "su -". You can set up sudo to allow unprivileged users access to run specific commands with elevated privileges, as sudo is intended to be used, but I highly recommend against following the Ubuntu approach of granting regular accounts unlimited sudo access.
 
Old 01-26-2017, 03:46 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,142
Blog Entries: 4

Rep: Reputation: 3229Reputation: 3229Reputation: 3229Reputation: 3229Reputation: 3229Reputation: 3229Reputation: 3229Reputation: 3229Reputation: 3229Reputation: 3229Reputation: 3229
Doesn't /var/log/auth.log capture details about this sort of thing?
 
Old 01-27-2017, 04:44 PM   #9
dj_thrive
LQ Newbie
 
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mpalumbo View Post
have you configured the user account to be part of the wheel group or edited the /etc/sudoers file to include that user account?
I have not done that, I didn't realize I had to. Thank you, I will research how to do this.
 
Old 01-27-2017, 04:47 PM   #10
dj_thrive
LQ Newbie
 
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27

Original Poster
Rep: Reputation: Disabled
Thanks you all for the info! I will check it all out. So just to clarify, I inherited this system, and was not here when it was being built. Also, my security guy that audited this system before I was hired (after the original sysadmin left) simply does a "sudo -i" to complete certain tasks.
 
Old 01-28-2017, 03:40 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
Quote:
Originally Posted by dj_thrive View Post
my security guy that audited this system before I was hired (after the original sysadmin left) simply does a "sudo -i" to complete certain tasks.
i'm pretty sure you could just as well use
Code:
su -
to achieve the same.

the fact that you don't know this indicates that you have a lot to learn before you can admin a mission critical system.
no offence.
 
Old 02-02-2017, 11:56 AM   #12
dj_thrive
LQ Newbie
 
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27

Original Poster
Rep: Reputation: Disabled
Thanks guys!
Code:
su
worked perfectly. I was just trying
Code:
sudo -i
because that what's was in the notes from the former sysadmin.

No offense taken. That's why I'm on here, relearning it all (I've gotten rusty over the last few years)

Cheers!
 
Old 02-02-2017, 12:11 PM   #13
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,521

Rep: Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619
" su " and "su - " are two very different commands

"su" is become root BUT!!! with your NORMAL users $PATH
( you stay in the same folder you were in and you DO NOT have /sbin in the path and a few other restrictions )

"su - " is a shortcut for "su -l root "
log in AS root ( that is a lower case L and not a i )
 
  


Reply

Tags
root, sudo


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] When I type "sudo grub" it says "command not found" in Ubuntu 9.10 Live CD. msbstar Linux - Newbie 10 04-01-2020 11:54 PM
why "su" and "sudo" commands need to be Set-UID programs?? goldengriff Ubuntu 3 11-07-2013 03:52 AM
When I type "sudo grub" it says "command not found" in Ubuntu 10.10 poumtatalia Linux - Newbie 5 09-14-2010 05:21 PM
cannot "sudo apt-get uptate" or "sudo" anything! plz help mdguy21061 Linux - Newbie 7 04-13-2008 11:59 PM
how do I get around the "submit passwd" prompt in ubuntu even if I use "sudo"? t3gah Linux - Distributions 1 02-22-2005 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration