Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
Unable to escalate with sudo as user
« previous
next »
Print
Pages: [
1
]
Author
Topic: Unable to escalate with sudo as user (Read 3386 times)
Twitchiz
Newbie
Posts: 14
Karma: 0
Unable to escalate with sudo as user
«
on:
May 08, 2023, 04:02:19 am »
Hello,
Here's the long story: I'm working on my firewall and it's redlining almost 100% usage constantly. I'm trying to log into terminal and see what's going on. ps -a only shows two processes so I figured it's because I'm not running as root or SU. So I try sudo ps -a, it asks for my password, I enter and it says I'm not in the sudoers file. Don't know what's going on as I am a member of the admins and wheel group. I tried getting to the sudoers file by escalating with sudo root but my password for root doesn't work. I've reset it multiple times, made sure root is enabled (but root login in System > Adminstration > Root login is disabled, it says log in as another user and switch to root, which is what I'm trying to do). I'm not having any luck here working towards figuring out why my processor is maxing out almost all the time. Not sure if it makes a difference, but my normal user is using TOTP. OPNsense version is 23.17_3-amd64. Firewall is a Protectli F4WB
Logged
Twitchiz
Newbie
Posts: 14
Karma: 0
Re: Unable to escalate with sudo as user
«
Reply #1 on:
May 08, 2023, 04:08:50 am »
I kept troubleshooting and if anyone sees this and doesn't want to beat their head against a wall as much as I have, go to System -> Settings -> Administration and make sure Sudo isn't disallowed and set the allowed groups. I set mine to ask password and wheel. If anyone thinks this is against best practices, let me know!
su still doesn't work though, it just told me sorry, possibly because when I tried root was disabled but I was happy with it working with my user.
Logged
benyamin
Full Member
Posts: 224
Karma: 13
Re: Unable to escalate with sudo as user
«
Reply #2 on:
May 08, 2023, 10:30:17 am »
For the sudo group(s) I use "wheel, admins", which I believe is the default.
When creating your non-root user, make them a member of the admins group.
After logging in with your non-root user, issue the following command:
Code:
[Select]
sudo -i
Then use the password of the non-root user with which you logged in to
elevate
to root.
You should then be presented with the OPNsense terminal menu. Press 8 for a shell.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
Unable to escalate with sudo as user