I don't know if it would count as a feature request to allow NOPASSWD: support for unprivileged users to run commands via sudo, but if you were looking for features to add, there's at least one organization that would appreciate that one :)
I get these results depending on which sudo option I have:
fwcloudapi ALL=(root) NOPASSWD: /usr/sbin/ip *
This one works when I do ssh fwcloudapi@mysystem sudo ip address show. It asks me for my password for the login, but not for the sudo command.
fwcloudapi ALL=(root) NOPASSWD: /usr/sbin/ip...
The -t flag works when I do it manually, but I am unsure how to configure that within FWCloud.
root@myothersystem ~ $ ssh -t fwcloudapi@mysystem sudo ip address show
fwcloudapi@mysystem's password:
[sudo] password for fwcloudapi:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state...
I might be on to something:
root@myothersystem ~ $ ssh fwcloudapi@mysystem sudo ip address show
fwcloudapi@mysystem's password:
sudo: no tty present and no askpass program specified
This error was not present until I enabled asking for password with the sudo command. It wouldn't have bugged...
Previously I had sudo run with no password, but requiring a password for sudo didn't help.
~ » ssh fwcloudapi@mysytem
fwcloudapi@mysytem's password:
Last login: Wed Apr 28 13:13:04 2021 from myothersytem
[fwcloudapi@mysytem ~]$ sudo ip a
[sudo] password for fwcloudapi:
1: lo...
I've added a sudo rule that allows any command with "sudo ip" such as "sudo ip a" or "sudo ip addr sh". I've also tried using an LDAP user instead of a local user without any luck. Thank you for all your patience so far.
I've verified that sudo ip a works with the user and that the user can log in to the system.
fwclouduserthing@mysystem's password:
Last login: Wed Apr 28 12:27:29 2021 from myothersystem
[fwclouduserthing@mysystem ~]$ sudo ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN...
It worked running as root, though. I DEFINITELY don't want to use the root account for this sort of thing. Do you know what commands the UI is sending along the SSH session?
Yup! Sameip a result with the user am connecting as.
The only line that results from trying the discovery is this:
2021-04-28 11:30:13|ERROR|Error getting network interface information: {}
Hello! I'm trying to get the "Discover Interfaces" tool working. I provided the correct address and username and password, and I can verify that a session was opened for that user. Does the user need to be an admin? Does this depend on networkmanager? Right now, my machine is configured...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.