Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Trying to login as admin and sudo is failing
« previous
next »
Print
Pages: [
1
]
Author
Topic: Trying to login as admin and sudo is failing (Read 1509 times)
Twitchiz
Newbie
Posts: 14
Karma: 0
Trying to login as admin and sudo is failing
«
on:
January 20, 2022, 06:30:56 am »
Hey everyone, I'm trying to SSH in and configure the repositories, but it was also an exercise in learning SSH keys. I set one up with Puttygen and got that working, got my user set up in the right groups and I can login with an SSH key. I then try sudo -s /usr/local/etc/rc.inital to get to the menu used by root upon login, and it says I am not a member of the sudoers file despite being a part of the admin and wheel group. Any idea what's going on? If I try su instead of sudo, it just says sorry. Any ideas?
Logged
Patrick M. Hausen
Hero Member
Posts: 6820
Karma: 572
Re: Trying to login as admin and sudo is failing
«
Reply #1 on:
January 20, 2022, 06:52:00 am »
System > Settings > Administration
Scroll down until you find the "sudo" section. There's a selection which groups are allowed to use sudo with "wheel" only being the default and "wheel, admin" an available option.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Trying to login as admin and sudo is failing
«
Reply #2 on:
January 20, 2022, 10:21:33 am »
I believe "admins" will in the standard configuration also provide the wheel group to the users of this group so that the group selector is really meant for selecting another group not admins. But there certainly isn't any harm in selecting both.
The problem would rather indicate sudo has not been enabled yet, see that same configuration section. You can choose to permit login of the selected groups either with our without user password.
Pro tips:
1. "su" does work without sudo, but it takes the root password instead of the user password.
2. "sudo su" is shorthand for the console menu (I hate typing).
Cheers,
Franco
Logged
Patrick M. Hausen
Hero Member
Posts: 6820
Karma: 572
Re: Trying to login as admin and sudo is failing
«
Reply #3 on:
January 20, 2022, 10:30:06 am »
Quote from: franco on January 20, 2022, 10:21:33 am
1. "su" does work without sudo, but it takes the root password instead of the user password.
The user account must be a member of the wheel group for su to work.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Trying to login as admin and sudo is failing
«
Reply #4 on:
January 20, 2022, 12:42:59 pm »
True, which I assume is the case for admins group. Actually I remember now that wheel group is given to all users directly or indirectly possessing the "page-all" attribute.
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Trying to login as admin and sudo is failing