Napp-It Linux - post install sudo problems

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

brianmat

Member
Dec 11, 2013
58
9
8
I'm working on a Linux install with Napp-It and twice on an Ubuntu 18.04 VM on ESX I've run into problems where after the install script has run I can't use sudo any longer. If I try to run a sudo command after entering the password the screen just echoes back and it never executes my command. I can't break out of it either.

I can su - root just fine.

Any thoughts on how to fix this? Google is not leading me in the right direction so I am obviously not asking it the right question. My hits are around using sudo and adding users to the sudoers file. Nothing helpful so far for this.

It doesn't always happen though. That's the weird bit. I am running another Ubuntu VM that works fine.

o_O
 

brianmat

Member
Dec 11, 2013
58
9
8
Nothing on this problem. I just simply ran the installer and tried to start napp-it when this all happened. I should have tested sudo before starting so I'm going to roll back this snapshot and try again. Hopefully Gea will pop in later and give a suggestion.
 
  • Like
Reactions: T_Minus

brianmat

Member
Dec 11, 2013
58
9
8
Found something interesting, but nothing that gives me a solution:

I have installed docker-ce on Ubuntu 18.02 and after I run the Napp-It GUI the problems start where I can no longer sudo. This time I started a new VM and only installed items required to run Napp-It.

Installed docker-ce following How to Install and Use Docker on Ubuntu 18.04 | DigitalOcean as my guide and got to the part for

Code:
sudo usermod -aG docker ${USER}
Then the Putty session started to hang again. I kicked up another session and logged in under root. I did an apt remove of docker-ce and after that was done all of my putty screens flashed and I saw all of the stuff I was typing into the screen.

I really don't know what could be a conflict between Napp-It and Docker, but that seems to be the conflict. If I never started the Napp-It UI everything seemed to work just fine.

This is odd - and frustrating.
 

gea

Well-Known Member
Dec 31, 2010
3,162
1,195
113
DE
There are only a few modifications for napp-it as napp-it is mostly a Copy and Run application mainly
adding a user napp-it and minihttpd (webserver is running under) and modifying /etc/sudoers to allow system settings

Check the setup shell script of napp-it
/var/web-gui/data/tools/linux/napp-it
 

WANg

Well-Known Member
Jun 10, 2018
1,308
971
113
46
New York, NY
There are only a few modifications for napp-it as napp-it is mostly a Copy and Run application mainly
adding a user napp-it and minihttpd (webserver is running under) and modifying /etc/sudoers to allow system settings

Check the setup shell script of napp-it
/var/web-gui/data/tools/linux/napp-it
*Inhales deeply*.
First of all, which version of Ubuntu are you running? Desktop or Server? Server tends to set their limits a bit higher than the desktop release.

Second of all, I would not treat Napp-it on Linux the same as Napp-it on the OpenSolaris forks like OmniOS or OpenIndiana, since their ZFS implementations tend to be more feature complete - given the vibe I picked up reading the docs on their website it's more of an experimental, "sorry kid, you're on your own" thing. If possible, I would rather use their OmniOS VM image instead.

Third - I am not 100% sure, but if your machine functions well up and until napp-it kicks in, and new processes will I/O wait until files are deleted (or napp-it closes), that's a sign the file descriptor pool has been exhausted. My guess is that ZFS and/or napp-it probably does all sorts of caching via the creation of temporary files. Remember that everything (devices, network sockets, pipes, actual files) are considered files in *NIX, so running out of file descriptors is usually a very bad thing, and if napp-it is consuming file descriptors beyond the limits configured by the OS, well, eventually your VM will simply grind to a halt. There's plenty of writeups teaching you how to raise the ulimit in Ubuntu.

- their online installer (wget http://www.napp-it.org/nappit | perl), just a large monolithic script does not seem to check the limits on a given machine and then tweak it accordingly, and that's a freaking headache, since every major app consuming lots of file descriptors (Oracle RDBMS is an example) will instruct you to tune your ulimits or look at your sysctl.conf, Just be aware of that.
 

brianmat

Member
Dec 11, 2013
58
9
8
FWIW, I rolled back my installation back to the pre-Napp-It and Docker installs. This time I updated Docker and Docker compose via apt and the problem does not appear (at least in overnight testing).

I'm using 18.04 Server.

With my original install everything works fine until Napp-It is fired up and then any sudo commands hang until Napp-It is killed. Not sure what the root of the problem was, but the apt packages seem to have solved it.

I was able to repro the problem on 3 different VMs with the original DigitalOcean Docker install.

And, FWIW, sudo was the ONLY command that exhibited this behavior. If I was logged in as root I could run any command I wanted to but as soon as I ran a sudo command the input would hang until Napp-It shut down. After the shutdown any commands I typed into the console were then executed in the shell.

I haven't seen anything like this before, but at least it looks like there's a workaround. I wanted to post it primarily as a possible FYI for other users.
 

gea

Well-Known Member
Dec 31, 2010
3,162
1,195
113
DE
I would expect a problem with the sudo config file /etc/sudoers

The Linux configuration script /var/web-gui/data/tools/linux/setup.pl adds a user napp-it,
copies the startscript napp-it and the stop script napp-it-stop (start/stop of the webserver),
then installs sudo when missing and adds an entry for user napp-it

Can you comment out this napp-it entry in /etc/sudoers
 

brianmat

Member
Dec 11, 2013
58
9
8
I think I isolated the reason, but not the cause.

This was added to the sudoers file, but I don't know from where:

Code:
## supress Console messages from sudo
Defaults logfile=/dev/null
Defaults !syslog
##
I commented those out and everything started to work again. This link Sudo hangs after password entry - issue with /dev/null clued me into the issue but also just happened to mention Napp-It. I don't see anything in the script that causes this to happen, but it could be we a referenced apt package (maybe).

I'm finishing some testing, but it looks like this was the main problem.

Update: When I start napp-it using the sh /var/web-gui/data/tools/linux/napp-it command this section is added again to the sudoers file. Napp-It does not get past the initial loading page. If I comment this section out and hard refresh the page the Napp-It UI takes me to the login prompt as expected.
 
Last edited:

gea

Well-Known Member
Dec 31, 2010
3,162
1,195
113
DE
This entry supresses console messages while executing sudo commands and was added by napp-it. In the past there was no problem with this entry but without the console is spammed whenever you open a napp-it menu
 

brianmat

Member
Dec 11, 2013
58
9
8
I'm not sure if this is an 18.04 only issue or not, but this was definitely the issue causing my sudo access problems. It also prevented Napp-It from running with this change as well.
 

gea

Well-Known Member
Dec 31, 2010
3,162
1,195
113
DE
18.04 is a dev release,
can you re download a 18.01b (current free) or 18.06 (current pro) in menu About > update

btw
This setting is made during napp-it bootup in
/var/web-gui/data/napp-it/zfsos/_lib/scripts/agents/agent-bootinit.pl

If the problem remains with them, I can remove this setting in the Linux setup
 

brianmat

Member
Dec 11, 2013
58
9
8
Sorry Gea - that should have read Ubuntu 18.04. I am running Napp-It 18.01b.

That's not confusing at all :) Sorry about that!
 

gea

Well-Known Member
Dec 31, 2010
3,162
1,195
113
DE
Can you please re download napp-it 18.01b where I have done a small modification.
If the result is the same I will remove this sudo setting from the Linux setup (resulting in a lot of console messages on sudo)
 

brianmat

Member
Dec 11, 2013
58
9
8
I deleted the existing installation and re-ran wget -O - www. napp-it.org/nappit | perl - same results. It is putting the entries in the sudoers file and presenting the same issues.
 

gea

Well-Known Member
Dec 31, 2010
3,162
1,195
113
DE
ok, I have removed this modification of /etc/sudoers in the Linux setup of napp-it 18.01c free
(some more console spamming is expected on sudo commands)