There are several challenges to terraforming Mars, that require technology that we do not currently possess (however this does not mean permanent settlements would be impossible). One of the biggest challenges is the one you posed. The technology necessary to inducing a planetary scale magnetic field does not yet exist, however it may not be the biggest problem for terraforming Mars. Several environmental scientists have pointed out that Earth's magnetic field has changed frequently, and even collapsed in the past, without any noticeable effect on life. Although I tend to agree with you that no magnetic field = no sustainable liveable atmosphere. In the future, I want to do research to investigate what type of technologies have been thought of to induce a magnetic field and whether any early theoretical conceptions of such technologies could be plausibly created within the next century. The second big problem to terraforming Mars is that it has a lower gravity than Earth. Many people believe that Mars would have a very difficult time retaining an atmosphere and would either require continual artificial renewal and/or a technology with the capability of creating artificial gravity. Another associated problem with low gravity is the fact that humans may not be able to function as well, or at all, in a low gravity environment long-term. In order to properly adapt to a low gravity environment we may need genetically engineer people. Fortunately, our ability to do that will probably exist before 2030.