[SOLVED] Can't sudo as an "Administrator" user

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
benchristel
Level 1
Level 1
Posts: 4
Joined: Tue Mar 01, 2022 11:36 pm

[SOLVED] Can't sudo as an "Administrator" user

Post by benchristel »

Hello, all! I'm running into a problem that has me stumped.

I added an "Administrator" user from System Settings > Users and Groups. I expected to be able to sudo as this user. But when I log in as the user in the desktop environment, it seems I can't:

Code: Select all

$ sudo ls .
[sudo] password for test220526:         
Sorry, user test220526 is not allowed to execute '/usr/bin/ls .' as root on hostname.
Here is the output of `id`:

Code: Select all

$ id test220526
uid=1002(test220526) gid=1002(test220526) groups=1002(test220526),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),114(lpadmin),134(sambashare)
I'm using Linux Mint 20.3 Edge with Cinnamon.

Thanks in advance for any tips you can provide!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: Can't sudo as an "Administrator" user

Post by trytip »

does this work?

Code: Select all

sudo -i
ls
Image
benchristel
Level 1
Level 1
Posts: 4
Joined: Tue Mar 01, 2022 11:36 pm

Re: Can't sudo as an "Administrator" user

Post by benchristel »

trytip wrote: Thu May 26, 2022 9:47 pm does this work?

Code: Select all

sudo -i
ls
Nope. Here's the output:

Code: Select all

$ sudo -i
[sudo] password for test220526:         
Sorry, user test220526 is not allowed to execute '/bin/bash' as root on hostname.
EDIT: Solved the problem by rebooting. :roll: Now sudo runs commands without error.
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: [SOLVED] Can't sudo as an "Administrator" user

Post by pbear »

If that worked, logging out then back in probably would have worked also without a reboot.
Locked

Return to “Beginner Questions”