I have a root user with password. I have another user "ubuntu".

I have issued the root@server~$ deluser ubuntu sudo command. The system echoes that ubuntu was removed from the sudo group. However, ubuntu can still use sudo -i and gain root access. I would like for sudo -i to prompt for the root password before allowing the user to gain access. How can I configure this? Thanks.

  • That's not how sudo works, you need to use su - to do that root user prompt. Or remove the user from sudoers (and remove the ubuntu user from the sudo group). However, they won't be able to use sudo to drop to the superuser interactive prompt this way, to my knowledge. – Thomas Ward Sep 26 '18 at 14:52
  • Hi Thomas, thanks for your reply. You're correct, using su - does prompt for a password. My problem now is that even though user "ubuntu" is not in any administrative groups, the user can still issue the sudo command unopposed. Ubuntu's groups are: ubuntu adm cdrom dip plugdev lpadmin sambashare. Do you have any suggestions for next steps? – KuboMD Sep 27 '18 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.