Sudo commands without puting in .bashrc

dear all,
When I start my laptop, I need to run one command

/etc/init.open-afs start 

and it require sudo privilege.

The only solution which occur to me is to put this command in .bashrc. But then the trouble comes as everytime I open any new tab it ask for the sudo password, which is pretty much annoying.

Please let me know if there is any other way to excute this command w/o having this issue of providing the password again and again..

thanks in advance,
emily

Depending on your startup system, you could place a "start" link to that script into one or more runlevel subdirectories ( rcn.d ) below /etc/init.d or /etc .
c.f. man runlevel

Dear RudiC,
Thanks for the reply..however, I wonder if I understood it well !!
putting it 'start link' is new for me..you want me to add some file name ( rcn.d ) in /etc/init.d ..and how to make it 'start link' ..???

Greetings from Hamburg,
emily

Excerpt from this machines /etc/rc3.d:

S80ntp -> ../init.d/ntp
S99acpi-support -> ../init.d/acpi-support

When the system is started in / switched to runlevel 3, all those Snn- links in rc3.d are scanned and the respective scripts are executed. Try to create a link, say, S99open-afs in the pertaining subdir and see what happens when booting.

EDIT: Sorry, be careful - just putting in that link and boot may be a bit lightheaded - read your system's docu first (man init etc., /etc/init.d/README etc.) and try it with a script that does nothing but output a line.

startup or booting time if you want to run some command then you can also write in /etc/rc.local

Create a config in the /etc/sudoers.d directory. Look at the sudoers file in the etc dir by examples. The tag you will need to put in there is NOPASSWD.

***Note*** word to the wize. Be careful this posses a big security risk on your system if used improperly.