Install Raspian on a SD card by following the instructions in the Raspberry Pi documentation pages.
Open LXterminal on the desktop and run
raspi-config
to modify the following settings:
The default is user Pi with root privileges and without password. First, login as root and assign root a password.
Add a new user, assign this user the same privileges as pi:
# adduser <user> # usermod -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,netdev,input,spi,gpio <user>
Check privileges are assigned correctly:
# id <user>
Remove super user privileges from Pi:
# visudo #pi ALL=(ALL) NOPASSWD: ALL
# vim /etc/group sudo:x:27:<user> # vim /etc/gshadow sudo:x:27:<user>
Change autologon to the new <user>:
# vim /etc/lightdm/lightdm.conf autologin-user=<user>
# apt-get install vim