I'd recommend researching basic bike/hiker etiquette. There are many articles online related to mtn bike/hiker interactions.
#1 is *slow down* when passing. Riding past people slowly is an order of magnitude safer for everyone. By slow, I mean... Under 5mph.
S L O W.
Unless you can be...