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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-26-2017, 11:23 AM
|
#1
|
LQ Newbie
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27
Rep:
|
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.
|
|
|
01-26-2017, 11:28 AM
|
#2
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep:
|
Contact the admin of the server is the correct "start".
|
|
|
01-26-2017, 11:31 AM
|
#3
|
LQ Newbie
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27
Original Poster
Rep:
|
Quote:
Originally Posted by Habitual
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.
|
|
|
01-26-2017, 11:45 AM
|
#4
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep:
|
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
and /var/log/auth.log or similar(s)...
Wish it was "more".
|
|
|
01-26-2017, 01:48 PM
|
#5
|
LQ Newbie
Registered: Jan 2017
Posts: 1
Rep:
|
Quote:
Originally Posted by dj_thrive
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.
|
01-26-2017, 03:32 PM
|
#7
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
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.
|
|
|
01-26-2017, 04:46 PM
|
#8
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,056
|
Doesn't /var/log/auth.log capture details about this sort of thing?
|
|
|
01-27-2017, 05:44 PM
|
#9
|
LQ Newbie
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27
Original Poster
Rep:
|
Quote:
Originally Posted by mpalumbo
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.
|
|
|
01-27-2017, 05:47 PM
|
#10
|
LQ Newbie
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27
Original Poster
Rep:
|
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.
|
|
|
01-28-2017, 04:40 AM
|
#11
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by dj_thrive
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 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.
|
|
|
02-02-2017, 12:56 PM
|
#12
|
LQ Newbie
Registered: Dec 2016
Location: Huntvsille, AL
Distribution: RedHat 6
Posts: 27
Original Poster
Rep:
|
Thanks guys! worked perfectly. I was just trying 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!
|
|
|
02-02-2017, 01:11 PM
|
#13
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,662
|
" 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 )
|
|
|
All times are GMT -5. The time now is 08:19 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|