4 Replies Latest reply on Sep 26, 2011 3:15 PM by andrea.bartolini

    root password in scc cores

    andrea.bartolini

      Dear expert,

       

      I'm currently try to write an automated script to run tests on SCC. So I have problem in using the ssh key and I need to login to each core of SCC with username and password.

       

      I have compiled the linux kernel in the latest sccKit. Since now the kernel built flow is done with buildroot, does the root password still be "intel123" or has been changed. Of course I'm asking it beacuse with intel123 I'm not more able to logging in.

       

      Thanks in advance for any help.

      Andrea

        • 1. Re: root password in scc cores
          tedk

          The cores only have the rooot user. When you logon to the MCPC as yourself, you can logon the cores as ssh root@rckxx where xx is the core number. No password is needed. sccKit sw installation set up ssh key value pairs for you.

           

          Why do you need a username/password on the core itself?

          • 2. Re: root password in scc cores
            andrea.bartolini

            I was asking this question because I'm writing a python scripts that loads different program in each SCC core.

            One easy solution as you suggest is just to call the ssh root@rckxx followed by the commad I want to execute. Unfortunately if I want to ensure the end of the task I am running it is hard using the python subrpocess lib.

            Thus I found a python library that implement directly the libssh2 API (http://www.no-ack.org/2010/11/python-bindings-for-libssh2.html) and open a ssh stream between the python script and each core. Unfortunately the two login methods it does supply are:

             

            - session.userauth_password(username, password)

            - session.userauth_publickey_fromfile(username, os.path.expanduser('~/.ssh/id_rsa.pub'), os.path.expanduser('~/.ssh/id_rsa'),passphrase)

             

            Now it does not work if I select user = root and password empty and it does not work if I point to the ssh key in sccKit.

            I have tried with an other lab machine with username and password and works pretty well.

             

            Thus I was wondering if the root user in each scc core has a special password. I tryed bruteforce the root account using software such as "john the ripper" and I obtained NO PASSWORD. Then I went throught the buildroot files to find if there was any setting I could change to enable the password...then I wrote the post.

             

            Thus it look like root account in buildroot is without password, but the I do not understand why I'm not allowed to login if I remove the ssh_config settings that point to the sccKit/.ssh/openssh_id_rsa . If I'm doing that as consequence of "ssh root@rckXX" it asking me the login password and even if I keep it empty it does not let me log in.

             

            Do you think it is possible to login to scc cores without using the sccKit/.ssh/openssh_id_rsa key ? or I am forced to do that and thus I need find the righ configuration for the session.userauth_publickey_fromfile method?

             

            Thanks in advance,

            Best

            Andrea

            • 3. Re: root password in scc cores
              tedk

              You can login as root and issue the adduser command to create a new user

              rck00:/root # adduser -h /bozo bozo
              Changing password for bozo
              New password:
              Bad password: too weak
              Retype password:
              Password for bozo changed by root
              rck00:/root #

               

              Then,

              tekubasx@marc101:~$ ssh bozo@rck00
              bozo@rck00's password:
              rck00:/bozo # pwd
              /bozo
              rck00:/bozo #

               

              You'd have to do this for each core, but I think you can write a script to do it. The logins you create would not persist over reboots. To have them persist over reboots, you'd have to modify SCC Linux. You'd have to build a custom SCC Linux. You have access to SCC Linux source code at http://marcbug.scc-dc.com/svn/repository/trunk/sccLinux/

              • 4. Re: root password in scc cores
                andrea.bartolini

                Yep it should work!!!

                 

                Thanks,

                Andrea