sudo in a shell script

Behrang Saeedzadeh behrangsa at
Fri Jul 15 09:50:21 UTC 2005


I want to write a shell script like this:

	sudo rmmod ipw2200
	sudo modprobe ipw2200

I've to this from time to time whenever my
wireless network connection is lost as Ubuntu
does not try to recover it (unlike Windoze).

Are there any options available for sudo for
passing the password directly to it instead
of waiting for the prompt?

In other words, I like something like this:

	sudo -pass mypassword rmmod ipw2200
	sudo modprobe ipw2200

Thanks in advance,
Behrang Saeedzadeh

Using Opera's revolutionary e-mail client

More information about the ubuntu-users mailing list