The following persons may administer oaths within the respective counties and towns for which they may be elected or appointed to office: clerks of courts, justices of the peace, mayors of cities, judges of probate, presidents of town councils, or persons acting as such, town clerks, and town wardens.