The following is a summary of dusting one's feet as a testimony against others, as I understand it.
There are two priesthood ordinances involving the feet; one involving the washing of the feet as described in John 13 and D&C 88:139, and the other involving shaking off the dust from the feet. The former being an ordinance of blessing, the latter - an ordinance of cursing. As an ordinance, consequently, neither is to be performed except through the Lord’s duly appointed and authorized servants.
Shaking off the dust from the feet is an action of disapproval and condemnation. To Joseph Smith and Oliver Cowdery, the Lord commanded that “in whatsoever place ye shall enter, and they receive you not in my name, ye shall leave a cursing instead of a blessing, by casting off the dust of your feet against them as a testimony, and cleansing your feet by the wayside” (D&C 24:15). However, not just anyone can undertake this ordinance, and the authority to do so has not been given to missionaries generally. Elder McConkie stated that “[n]o curse should ever be decreed except by direct revelation from the Lord commanding such to be done” (Elder Bruce R. McConkie, Doctrinal New Testament Commentary, 2:123).
This is probably because testifying against anyone is a frightening responsibility which mortals cannot fully comprehend without the guidance of the Spirit.
Elder James E. Talmadge summarized this ordinance as follows:
“To ceremonially shake the dust from one's feet as a testimony against another was understood by the Jews to symbolize a cessation of fellowship and a renunciation of all responsibility for consequences that might follow. It became an ordinance of accusation and testimony by the Lord's instructions to His apostles as cited in the text [of the New Testament]. In the current dispensation, the Lord has similarly directed His authorized servants to so testify against those who wilfully and maliciously oppose the truth when authoritatively presented. The responsibility of testifying before the Lord by this accusing symbol is so great that the means may be employed only under unusual and extreme conditions, as the Spirit of the Lord may direct” (Elder James E. Talmadge, Jesus the Christ, p.345)
Interestingly, the Lord cautions those performing this ordinance that it should not to be done in the presence of those they are testifying against “lest thou provoke them, but in secret: and wash thy feet, as a testimony against them in the day of judgment” (D&C 60:15). The Prophet’s brother, Samuel Smith, performed this ordinance at least once while preaching the gospel, as reported by the Prophet’s mother:
“On the 30th of June, Samuel started on the mission to which he had been set apart by Joseph, and in traveling 25 miles, which was his first day’s journey, he stopped at a number of places in order to sell his books, but was turned out of doors as soon as he declared his principles. When evening came on, he was faint and almost discouraged, but coming to an inn, which was surrounded with every appearance of plenty, he called to see if the landlord would buy one of his books. On going in, Samuel inquired of him, if he did not wish to purchase a history of the origin of the Indians.
“‘I do not know,’ replied the host; ‘how did you get hold of it?’ ‘It was translated,’ rejoined Samuel, ‘by my brother, from some gold plates that he found buried in the earth.’ ‘You liar!’ cried the landlord. ‘Get out of my house-you shan’t stay one minute with your books.’
“Samuel was sick at heart, for this was the 5th time he had been turned out of doors that day. He left the house and traveled a short distance and washed his feet in a small brook, as a testimony against the man. He then proceeded five miles further on his journey, and seeing an apple tree a short distance from the road, he concluded to pass the night under it; and here he lay all night upon the cold, damp ground. In the morning, he arose from his comfortless bed, and observing a small cottage at no great distance, he drew near, hoping to get a little refreshment…. He…proceeded to Bloomington, which was 8 miles further.
“Here he stopped at the house of John P. Greene, who was a Methodist preacher and was at that time about starting on a preaching mission. He, like the others, did not wish to make a purchase of what he considered at that time to be a nonsensical fable; however, he said that he would take a subscription paper, and if he found anyone on his route who was disposed to purchase, he would take his name, and in two weeks Samuel might call again and he would let him know what the prospect was of selling. After making this arrangement, Samuel left one of his books with him, and returned home. At the time appointed, Samuel started again for the Reverend John P. Greene’s, in order to learn the success which this gentleman had met with in finding sale for the Book of Mormon. This time, Mr. Smith and myself accompanied him, and it was our intention to have passed near the tavern where Samuel was so abusively treated a fortnight previous, but just before we came to the house, a sign of smallpox intercepted us. We turned aside, and meeting a citizen of the place, we inquired of him, to what extent this disease prevailed. He answered that the tavern keeper and two of his family had died with it not long since, but he did not know that anyone else had caught the disease, and that it was brought into the neighborhood by a traveler who stopped at the tavern overnight” (Lucy Mack Smith, History of Joseph Smith, pp.225-226)