A daimyo was a feudal lord in shogunal Japan from the 12th century to the 19th century. The daimyos were large landowners and vassals of the shogun. Each daimyo hired an army of samurai warriors to protect his family's lives and property.
What is the role of a samurai?
Samurai were employed by feudal lords (daimyo) for their material skills in order to defend the lord's territories against rivals, to fight enemies identified by the government, and battle with hostile tribes and bandits. For this reason, samurai could live in barracks, in a castle or in their own private homes.
What was the role of a shogun?
Shoguns were hereditary military leaders who were technically appointed by the emperor. However, real power rested with the shoguns themselves, who worked closely with other classes in Japanese society. Shoguns worked with civil servants, who would administer programs such as taxes and trade.