LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-09-2016, 03:17 PM   #16
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55

Quote:
Originally Posted by michaelk View Post
What type of virtual machine?

Typically sudo is not configured on Red Hat/CentOS systems. My CentOS 7 is basically an as is min install.
CentOS 7.2 Azure VM
 
Old 08-09-2016, 03:38 PM   #17
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,472

Rep: Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569
So I assume you downloaded a pre-configured CentOS image? According to the MS Azure website they were configured by Openlogic and I know nothing about them.
 
Old 08-09-2016, 03:40 PM   #18
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by michaelk View Post
So I assume you downloaded a pre-configured CentOS image? According to the MS Azure website they were configured by Openlogic and I know nothing about them.
I created through the portal, yes, I remember it said Openlogic.
 
Old 08-09-2016, 03:51 PM   #19
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,472

Rep: Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569Reputation: 3569
So they might of built a similar script like Ubuntu that the first created user has admin rights via sudo.
 
Old 08-09-2016, 03:58 PM   #20
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
Have you checked to see if the UID (1000) is being used in sudoers rather than the username?
 
Old 08-09-2016, 06:35 PM   #21
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,449

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Quote:
Originally Posted by abefroman View Post
Code:
# cat /etc/sudoers |grep -v \#
That grep is overly restrictive. First, it suppresses lines that have "#" anywhere in the line, not just the pure comment lines. This would be better:
Code:
grep -v '^#' /etc/sudoers
But second, you might have a line that begins with "#include", and that line is not a comment. If you have a line like
Code:
#include /etc/sudoers.d
you should look in that directory for more files that get included.
 
3 members found this post helpful.
Old 08-09-2016, 06:43 PM   #22
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by rknichols View Post
If you have a line like
Code:
#include /etc/sudoers.d
you should look in that directory for more files that get included.
That was it!

Code:
[root@centos7 terry]# cd /etc/sudoers.d/
[root@centos7 sudoers.d]# ls
waagent
[root@centos7 sudoers.d]# cat *
terry ALL = (ALL) NOPASSWD: ALL
 
Old 08-10-2016, 11:37 AM   #23
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,244
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Would be nice if they would warn you about this ahead of time.
Like has already been said Centos doesn't add users to Sudo automatically.
 
  


Reply


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] sudo to user other than root but do not allow sudo to root Westmoreland Linux - Security 3 02-03-2015 11:48 AM
Question about the sudo command, specifically how to have sudo act as if user is root slacker_ Linux - Newbie 17 09-22-2013 03:48 PM
User is Not Able to sudo su -l root devUnix Linux - Server 22 08-14-2013 06:52 AM
startx from root user is working while from sudo user not unkn(0)wn Linux - Newbie 2 08-17-2012 09:31 PM
Gconf-editor settings not sticking for root, sudo user, or user when run sandaili Fedora 1 07-19-2008 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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