"Discover Interfaces" not working | Page 2 | FWCloud Forum

"Discover Interfaces" not working

pengels

New member
Is there a way to configure FWCloud to use the password to connect via SSH and then run the sudo command without waiting for a password prompt?
 

Carles Munyoz

Administrator
Staff member
Don't worry, I totally understand.

I think that, as you have already pointed, this can be the problem: sudo: no tty present and no askpass program specified

It is not possible to use the -t option in the FWCloud ssh connection.
And it is not possible what you have said in your last post.
 

Carles Munyoz

Administrator
Staff member
I think that it is posible to disable the requiretty option for your ssh user in the /etc/sudoers file. It can be a solution for the problem.

Other option is to use the root user, but don't save its password in FWCloud.
We usually recommend that, as an extra security measure, don't shave ssh user data in the FWCloud firewalls data. SSH data are only required occasionally, for example, when you have to make things like install firewall policy, discover interfaces, install VPNs, etc.

The rest of the time you can operate with FWCloud without the need of these data.

Please, let me know if some of these options solves the problem.
 

pengels

New member
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 * !requiretty

I get root@myothersystem ~ $ ssh fwcloudapi@mysystem sudo ip address show fwcloudapi@mysystem's password: sudo: no tty present and no askpass program specified

fwcloudapi ALL=(root) /usr/sbin/ip *
Same result as the one above.

fwcloudapi ALL=(root) /usr/sbin/ip * !requiretty
Same result as the two above.


At this point, I'm mostly just posting my troubleshooting steps in case I fix it so it could be helpful if someone else runs into this issue.
 

pengels

New member
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 :)
 

Carles Munyoz

Administrator
Staff member
One moment, I think that the problem is that you are not using a user with sudo privileges (a sudo user), you are allowing a regular user the execution of some commands as a privileged user with sudo. These are quite different things.

May you create a new user with sudo privileges as explained here and try it again with this new user ?

Answering your last post, of course, any suggestion is welcome and studied. Some of the features that we have been incorporating to FWCloud have born form Internet community features request.

Regarding your feature request, have in mind that for make things like install policy, upload VPNs config, etc. you need root or a sudo user. For example, you can not upload the IPTables policy into your firewall without a root or sudo user. For this reason we require such kind of user.
 

pengels

New member
Adding the user to the wheel group resulted in the same
sudo: no tty present and no askpass program specified
as the sudo rules
 

pengels

New member
Does it ssh in and then run the command or does it ssh in and run the command at the same time like I've been doing in the examples I've sent?
 

Carles Munyoz

Administrator
Staff member
Have you created a new user or simply added the one that you are using to the wheel group ?
May you create a complete new sudo user following all the steps in the link of my previous post ?

FWCloud uses a npm node module for ssh communications.
It fist creates the ssh connection and then sends the command.
 

Carles Munyoz

Administrator
Staff member
Please, can you specify the exact Linux distribution version of your server ?

We are going to try reproduce the problem.
If we can reproduce the problem we will be able to find a solution.
 

Carles Munyoz

Administrator
Staff member
We have been able to reproduce the problem in a Centos 7 installation and we have already applied a patch to solve it.
The solution will be available in the next FWCloud release that we are going to publish in a few days.
 

Carles Munyoz

Administrator
Staff member
We have just published a new release of FWCloud with the patch for make it go in Centos 7.
Please, may you update, try it again and confirm if the problem is solved?
 
Top