I am going to enter either the USA or Canada with a student visa.?
Neither the USA or Canada with provide you with a passport unless you become a citizen. Their procedures are about the same. You need to become a permanent resident of either country, meet the naturalization requirements and then become a citizen. This process takes about 46 years in either country. But a student visa generally cannot lead to permanent residency. In both countries it is a temporary non-immigrant visa. You are expected to depart and go home when your studies are complete. To become a permanent resident, you have to transition to a visa via employment after your student visa that will allow it. Such as the H1B in the USA. You can do this at the end of your studies with work programs that allow such a transition. From there you need to then follow the immigration process of that country to permanent residency and eventually citizenship. Neither process is simpe in the USA and Canada. Expect to spend about 10 years from the start of your studies until the possibility exists of citizenship. And then if you only follow a path to it that goes according to plan. Do not expect it to be easy. It is intentionally not easy for anyone to become a citizen of a foreign country and youre not getting a passport from the USA or Canada because you want it. You have to demonstrate your value as a potential citizen first. That takes 5 years by itself. So as long as you have a plan and have at least 10 years to execute it, thats about how soon you can get provided a passport as a US or Canadian citizen. If youre from China or Indian, add another 515 years on that total in the USA.