Depending on where your friend is from, visa arrangements will be different. A quick web search will yield the answers you seek, and I would assume that he would be able to get at least a month regardless of nationality, I know US citizens get 90 days. Somewhere else? I always recommend Thailand. Your Morocco trip sounds like fun, too.