PDA

View Full Version : user is not in sudoers file...



gborysiak
23-Jul-2015, 12:51
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

gborysiak
26-Jul-2015, 09:41
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

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



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