Quantcast
Channel: Active questions tagged mount+fstab - Ask Ubuntu
Viewing all articles
Browse latest Browse all 699

In Ubuntu 22.04- how do I issue my password in a startup application that requires a sudo?

$
0
0

I have a couple of network folders in other linux machines on my CIFS network.
I've set them in FSTAB and they are accessed OK, PROVIDING I do a sudo mount -a when the system is restarted.
I've managed to put the mount -a in a gnome-terminal app invoked by my .config/autostart, but the gnome-terminal (sudo) then asks for my password.
How can I provide my password in the Desktop entry in this autostart?
EG:
Exec=gnome-terminal --tab --title="FSTABBER INITIATE!" --command="bash -c 'sudo mount -a; echo DID OUR FSTABBER WORK OK?; $SHELL'"

(Don't worry- I'll get rid the extraneous echo and $SHELL once it works successfully)
An alternative might be to put me in a sudoers file, but I'd rather do a sudo whenever I actually need it.


Viewing all articles
Browse latest Browse all 699

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>