Every type of wartime Wehrmacht unit was organized according to specific guidelines that were laid out in a special chart. The chart laid out exactly how many men were to be assigned to the unit type, what their roles would be, what ranks these soldiers were to hold, and what weapon each was to carry. The chart also specified exactly what kinds of vehicles each unit type was to be equipped with. This chart was called the K.St.N., an abbreviation for Kriegsstärkenachweisung - War Strength Certificate.
Weapons were assigned to soldiers based on their roles, not their ranks. The issued weapon did not become the personal property of the soldier; it was owned by the German Reich, and units had to hold soldiers accountable for the weapons issued to them. To identify what sort of weapon was issued to a soldier, one need only look at the K.St.N. chart for the corresponding unit type.
As of this writing, there are some great resources online for looking up the K.St.N. charts. One of these is Christoph Awender's WWII Day by Day, which contains many of the K.St.N. charts neatly laid out in a way that makes it easy to visualize the manpower and equipment of each unit type. Sturmpanzer.com has a download section that allows one to download lots of K.St.N. as scans of the original wartime German documents.
To illustrate the information contained in the K.St.N., let's look at the original German K.St.N. number 4033, for a Landesschützen-Kompanie stationed in the occupied Western territories. The K.St.N charts were changed and updated until the end of the war, so it is important to note the date; this one is dated February 1, 1941.
From this document we can see that a Landesschützen-Kompanie in the West was to be commanded by an officer, armed with a pistol or machine pistol, and assigned a horse for his use (later this was removed). To the commander was attached a Kompanietrupp consisting of a Hauptfeldwebel armed with a pistol or machine pistol, 5 enlisted messengers on bicycles armed with rifles, 2 enlisted clerks armed with rifles, an enlisted caretaker for the horse armed with a rifle, and one car, with an enlisted driver armed with a rifle.
Within the Landesschützen-Kompanie were 4 Züge (platoons). Each Zug had an officer, armed with a pistol or machine pistol and assigned a bicycle, as a platoon leader. To this leader was attached a Zugtrupp consisting of an NCO armed with a rifle, and 4 enlisted messengers armed with rifles, of which two were on bicycles, and one was equipped with a signal horn.
Each Zug had 4 Gruppen (squads). Each Gruppe was led by an NCO, armed with a rifle. One Gruppe had a light machine gun, and a cart to go with it. The MG gunner and his assistant (enlisted men) were armed with pistols. This Gruppe also had 7 enlisted men armed with rifles. The other 3 Gruppen simply had 9 enlisted riflemen.
The unit also had a Tross, which was the logistical and administrative part of the Kompanie. The Tross had 5 NCOs, armed with pistols or machine pistols, each with his own specific duties. Two of these NCOs had bicycles. The Tross also had 5 enlisted men armed with rifles: three horse drivers, a cook, and a vehicle driver. The Tross had two carts with two horses each- one for rations, and one for baggage. It also had a field kitchen, with two horses to tow it, and a light open truck.
This K.St.N was different from the K.St.N for a Landesschützen-Kompanie in the Ost, which had 4 machine guns per Zug. It was also different from the K.St.N. for a Landesschützen unit located within Germany.