So you can run snap with sudo, just like you need to use sudo to run sudo apt install
. For example, to install the ripgrep snap:
sudo snap install rg
You can now leave off the sudo and a password window will appear (and I think this is in 16.04 and maybe 14.04 too, since part of the point of Snaps is that they work the same across versions):
snap install rg
# password window will pop up
What you can also do is log in first, and then you don’t need a password:
snap login
# when prompted, enter Ubuntu account email and password
snap install rg
# this works now without sudo or password window appearing