# user is not in sudoers file...

**URL:** <https://forums.suse.com/t/user-is-not-in-sudoers-file/27267>\
**Category:** Azure\
**Created:** [July 23, 2015, 2:51pm UTC](https://forums.suse.com/t/user-is-not-in-sudoers-file/27267 "2015-07-23T14:51:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gborysiak](https://avatars.discourse-cdn.com/v4/letter/g/ea5d25/32.png) [@gborysiak](https://forums.suse.com/u/gborysiak)\
**Post date:** [July 23, 2015, 2:51pm UTC](https://forums.suse.com/t/user-is-not-in-sudoers-file/27267/1 "2015-07-23T14:51:47Z")

</div>

Hi,

I can not execute sudo command with the user I created on installation.

Error message is :  
mladmin is not in the sudoers file. This incident will be reported.

I used yast to allow another user to execute some command before I got the problem.

I try to create a new admin user using the new Azure portal without success. Same problem occurs.

Any idea to solve the problem ?

Regards,

Gregory

---

<div class="post-metadata">

**Author:** ![gborysiak](https://avatars.discourse-cdn.com/v4/letter/g/ea5d25/32.png) [@gborysiak](https://forums.suse.com/u/gborysiak)\
**Post date:** [July 26, 2015, 11:41am UTC](https://forums.suse.com/t/user-is-not-in-sudoers-file/27267/2 "2015-07-26T11:41:04Z")

</div>

Finally I corrected the problem using this method [http://blogs.msdn.com/b/mast/archive/2014/11/20/recovering-azure-vm-by-attaching-os-disk-to-another-azure-vm.aspx](http://blogs.msdn.com/b/mast/archive/2014/11/20/recovering-azure-vm-by-attaching-os-disk-to-another-azure-vm.aspx)

A part of the original sudoers file was removed by Yast

## Uncomment to allow members of group wheel to execute any command

# %wheel ALL=(ALL) ALL

## Same thing without a password

# %wheel ALL=(ALL) NOPASSWD: ALL

## Read drop-in files from /etc/sudoers.d

## (the ‘#’ here does not indicate a comment)

#includedir /etc/sudoers.d  
#includedir /etc/sudoers.d

The last line tells sudo to load files in /etc/sudoers.d. As Azure add admin user in /etc/sudoers.d/waagent, without this line, it is not possible to execute sudo command at all.

Regards,

Gregory

[QUOTE=gborysiak;28843]Hi,

I can not execute sudo command with the user I created on installation.

Error message is :  
mladmin is not in the sudoers file. This incident will be reported.

I used yast to allow another user to execute some command before I got the problem.

I try to create a new admin user using the new Azure portal without success. Same problem occurs.

Any idea to solve the problem ?

Regards,

Gregory[/QUOTE]
