LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 11: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 11:30 AM.
 
Old 01-26-2017, 11: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, 11: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, 11: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, 01: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, 03:02 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,662

Rep: Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657
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, 03:32 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143
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, 04:46 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,056
Blog Entries: 4

Rep: Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068Reputation: 4068
Doesn't /var/log/auth.log capture details about this sort of thing?
 
Old 01-27-2017, 05: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, 05: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, 04:40 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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, 12:56 PM   #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, 01:11 PM   #13
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,662

Rep: Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657
" 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-02-2020 12:54 AM
why "su" and "sudo" commands need to be Set-UID programs?? goldengriff Ubuntu 3 11-07-2013 04:52 AM
When I type "sudo grub" it says "command not found" in Ubuntu 10.10 poumtatalia Linux - Newbie 5 09-14-2010 06:21 PM
cannot "sudo apt-get uptate" or "sudo" anything! plz help mdguy21061 Linux - Newbie 7 04-14-2008 12:59 AM
how do I get around the "submit passwd" prompt in ubuntu even if I use "sudo"? t3gah Linux - Distributions 1 02-22-2005 05:42 PM

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

All times are GMT -5. The time now is 08:19 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