user is not in sudoers file...

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

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

[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]