Emonbase passwords

Hi All,

I bought the emonTx v3.4 and the latest Raspian Wheezy SD card in early Dec 2015 to install in my Pi 2.  I have managed to get the monitoring system up and running with the help of this forum but I have now reached the point where I would like to add a few features to my setup but I am having difficulty finding out some of the basic information for the SD image.  I want to add an SSL connection to emoncms using an existing certificate I have installed in my Apple Server.  An extremely useful post from Paul Reed ( http://openenergymonitor.org/emon/node/5997 ) has given me the outline to follow which involves copying the certificates into the root file system of the Pi.  A search of  the web has revealed that I can add the Apple File Protocol (afp) using the 'netatalk' command that will let me 'Connect to Server' using the Pi IP address in Finder.  I can then drag/drop files onto the Pi very easily.

The arrangement works well when I connect to user 'pi' with password 'raspberry' BUT I have spent 45 min trawling through the forum looking for the root user password in vain. I can obviously use a 2 stage copy to get these files into the right directories in /etc/...   Deep within one of the post threads it was suggested that user 'root' password was 'root' but the very next post said that it did not work for him and it does not work for me!  As a by product of this search I noticed that the password for the user 'pi' is being changed in the new Jessie image.

It would be good to have an easily accessible file prominently displayed summarising some of the fundamental default information such as passwords relating to the various software images and module versions available.

Can anyone provide the correct root password, please?  This post is not intended as a criticism of the vast store of knowledge available on the site which has been invaluable in setting up my system but it can be overwhelming to the first time user.

Many Thanks

Bill Thomson's picture

Re: Emonbase passwords

Hi Malcolm,

Use the command sudo bash to switch to the root user, then use the command passwd to set the root user's password.

iochroma's picture

Re: Emonbase passwords

Many thanks Bill.  

Stumbling around in the foothills of my Linux knowledge, I, perhaps need to get a good Linux manual!

On a related but very similar problem of identification, I encountered regarding the supplied SD image, I had some difficulty in identifying the version of Raspian and emoncms that were installed.  The thread describing the upgrade to emoncms v9 made it clear that different procedures are needed for Wheezy and Jessie. But first, I had to identify what my image was using....

The only way I could find to identify the Raspian variant was to use:

'sudo apt-get install lsb-release' followed by  'lsb_release -a'          (included the word Wheezy)

and to identify the version of emoncms was to attempt the upgrade with:

'cd /var/www/emoncms && git pull'            (included 8.5.2        ->  8.5.2)

I am sure there must be smarter ways but nothing seemed obvious!

pb66's picture

Re: Emonbase passwords

many linux based OS's no longer have an actual root user as it considered a security weakness. Mosr root activities can be done by temporarily elevating the current users status for the command being used with "sudo" (as long as the user is in the suders group, which the default user pi is), for example 

sudo apt-get update

sudo apt-get upgrade

 are both apt-get commands being run as root. You can also "switch" to the root user from user pi with the command 

sudo su

and switch back again with

su pi

By using the command Bill has provided or just

sudo passwd

you are creating a root user and assigning a password for that user, unless there is a good reason to do it that way it's probably best avoided, or if only to do some specific tasks you could remove it again using

sudo passwd -l root

It's totally your choice of course, but the reason the root password isn't provided anywhere is because it doesn't exist until you create it.

Paul

 

iochroma's picture

Re: Emonbase passwords

Thanks for the explanation, Paul.

As there appear to be alternative ways to achieve the original goal of getting the SSL files into the right directories on the RPi without unnecessarily compromising the overall security system, I will adopt your suggestions.  

I was of course only intending to use the root user temporarily to move the files into place quickly in my small private network of computers before switching back to the 'pi' user. Linux certainly has a degree of flexibility that was not present with my early experiences with Windows!

Emoncms is now up and running with a SSL connection thanks to the forum; now to move the root file system onto a small HDD for some extra resilience with more forum advice again!

Malcolm 

Bill Thomson's picture

Re: Emonbase passwords

and switch back again with

su pi

Hi Paul,

su pi would indeed switch back to the "pi" user, but then you'd be two shells deep on top of the original shell - the switch to the root user, and the switch to the pi user. The env command will show SHLVL=2 after the switch to the pi user.

Using exit vice su pi will keep that from happening i.e. it will return to the shell the su command was issued from.

Not sure it really makes a big difference other than eating some memory, and the risk of switching back to the root account unintentionally, but thought I'd mention it.

pb66's picture

Re: Emonbase passwords

Cheers Bill, very useful info, that nudged the proverbial penny to drop. It had previously eluded me that they were shells within shells. Not that it makes much difference as you say (in this type of instance) most of the time the shells are shutdown shortly after "the edit" but it helps get a better handle on what's actually happening and would be more correct to "exit" rather than "switch" and add another shell level.

Paul

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.