I was recently able to assist a friend in enabling root access to his Raspberry Pi – in the event that this advice may help others as well, here it is:
My friend needed root access to work with the low level IO on the Raspberry Pi. While the username account supplied with a Raspberry Pi does have sudo rights on the Pi’s Linux OS, the Netbeans IDE he was using wasn’t able to use sudo when communicating with the Pi, complicating development. I advised him to set a known password to the Pi’s root user account and then set Netbeans to use the root account:
>> sudo su
This will now change to operating as the root user.
Set the password to something suitable – this will change the root user’s password. Now set Netbeans to communicate with the Pi using the username “root” and the password you chose and you’ll have full root access.
While I realise that logging into your PC as root is generally not a great idea, the situation is rather different for something like a Raspberry Pi or similar, which is already dedicated to a specific task.