What are these types of soldiers called?

During the military service in Iran, some soldiers are responsible for traffic control (entrance and exit of people in a garrison or headquarters after writing down their names and searching them), appearance and discipline of other soldiers, opening and closing gates for vehicles, and things like that (you could say they are in charge of the building although having low ranks). What do we call them in English?

P.S. I believe the words "doorman" or "guard" wouldn't be appropriate since they do not encapsulate all of their duties.


The US military often refers to the people performing these functions as “specialists” of some kind.

For example, a search for the term “logistics specialist” led to this: https://www.navsup.navy.mil/public/navsup/home/

A search for “security specialist army” led to a number of thiings, including this description of an officer-level position that provides the names of the positions that such a person would supervise: https://www.navsup.navy.mil/public/navsup/home/

These include Security Guards, who are different from Military Police, in the same way that a night watchman is different from a detective.