`upd` script asks for a password twice

I almost always use the upd script to update Garuda. Thank you for that. It is fast to execute and handles it all for me.
I have noticed however, that sometimes towards the end of the update process, it requires my sudo password, again. When I run "upd" I very often leave it aunattended (to complete in the background). If I am not there to see that second password prompt, the request seems to expire and I don't know if the script exited successfully or not.

When sudo prompts you for a password it will retain that for some time (15 minutes). If you run sudo again within 15 minutes it will not prompt. If you run it after that time then it will prompt again.

upd is an alias that runs a series of commands, so if one takes longer to run then sudo will prompt for a password again.

2 Likes

Yep, I now how sudo works. But I am not sure if this is intended for that script in particular. Some scripts are made in a way to remember the password the first time it is requested from the user, and then pass it on to processes executed further on, to ensure an uninterrupted process.
I am not sure of the intended approach here.

which upd
3 Likes

It's not a script. It is an alias

4 Likes

OK, now that makes sense. And it is actually the sudo updatedb that is prompting me for password. I get it. 10x