Link to home
Create AccountLog in
Avatar of ouch_mybrain_
ouch_mybrain_

asked on

Linux Batch

Hi,

I have a batch file that I am executing in Linux (Terminal). Some of the commands in the script require an admin password to progress - is there a way to add a switch to the commands that are prompting for a password to autopopulate the password when required? The script takes a while to complete and I would like to be able to run it and then go away for 10 minutes, and it be completed when I come back.

Many Thanks,
ASKER CERTIFIED SOLUTION
Avatar of DonConsolio
DonConsolio
Flag of Austria image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of ouch_mybrain_
ouch_mybrain_

ASKER

found another way of dealing with this by turning off the prompt altogether, this will work for me:

Open the terminal window from Applications --> accessories --> terminal, run the command:

    sudo visudo

Find the line that says

    %admin ALL=(ALL) ALL

and change it to

    %admin ALL=(ALL) NOPASSWD: ALL

Save and exit the file