Getting root access to a Raspberry Pi using the Netbeans IDE

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.

>> passwd

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.

Leave a Comment

Filed under code

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.