You can boot into recovery mode, start a root shell from there and add your user account to the sudo group with adduser USERNAME sudo
.
Another solution is, once you are in the root shell, to edit the sudoers file as the thread you linked suggests.
See Broke my sudoers password, how do I reset it without using sudo? for details.
… what's the difference in security …?
In terms of the authentication and filesystem permissions, honestly, not much. We can wax lyrical about policykit
and sudoers
but these are just technicalities. Windows has had equivalent mechanisms for well over a decade.
The core difference was in default settings. A normal, just-bought-a-computer Windows user would have full system write access. No prompts. No UAC. Even though XP could be locked down, its users were indoctrinated into just being able to do stuff, permissions be damned.
Microsoft has —despite constant resistance from veteran users— improved on this over time.
But the important thing is that users are still, statistically speaking, idiots. If they want something (a repo for a graphics driver, a batch of screensavers, or even dripping wet Warhammer figurines) they're probably going to click the closest thing to Okay! Just install it! until they have what they want.
A few years ago I wrote how Linux isn't invulnerable. Exactly the same applies to Windows, even today.
Don't get me wrong, Ubuntu still has a lot on its side:
- Open source is the big one. You can view almost all the code running on your system (except binary blob drivers and firmwares).
- Ubuntu also has its repositories which are maintained by trusted developers. These make a lot of software available in a safe environment without users needing to go fishing.
- The same mechanism provides system-wide security updates. For non-core software, Windows relies on applications updating themselves.
- Mechanisms like AppArmor and SELinux to sandbox applications, limiting what they can touch.
- A smaller user-base has traditionally meant we're a less juicy target for malware creators.
These are all things that can be sidestepped... 0-Day exploits still affect us and a targeted attack on a user or demographic is just as likely to succeed if everything else is equal.
Best Answer
This is because you haven't set a password yet. Login to your admin account, and go to
System Settings
Then click user accounts, and unlock it. Click the user you just created, then click the
Account Disabled
under Login Options.Chose one of the 3 options from the drop down menu (Set a password now, Login without a password or enable this account). They will, respectively, ask you to enter a new password, not need one when logging in to the new account (just press enter to login in at the login screen) and ask for one when you first login.
Finally, click the lock button.