1

I'm using the Debian image for the BBB from here: Debian (BeagleBone Black - 2GB eMMC) 2014-05-14

This image has the Cloud9 IDE built-in. It works quite nicely for my purposes, but I can't figure out how to add a password. Anyone on the network can go to 11.22.33.44:3000 (not the actual IP address) and the IDE will automatically log them in as "John Doe" (No password requested).

Is there a way to request a user name and password when logging into Cloud9? I'm ok if the browser saves the password, but it should ask at least once.

2 Answers 2

3

I just found out the solution.

To set a default username and password:

  1. Open the file /opt/cloud9/build/standalonebuild/configs/standalone.js.

  2. Locate the following code block. (Should be at the top of the file)

    if (!optimist.local) {
        optimist
            .boolean("t")
            .describe("t", "Start in test mode")
            .describe("k", "Kill tmux server in test mode")
            .default("b", false)
            .describe("b", "Start the bridge server - to receive commands from the cli")
            .default("w", config.workspaceDir)
            .describe("w", "Workspace directory")
            .alias("p", "port")
            .default("port", process.env.PORT || config.port)
            .describe("port", "Port")
            .alias("d", "debug")
            .default("debug", false)
            .describe("debug", "Turn debugging on")
            .alias("l", "listen")
            .default("listen", process.env.IP || config.host)
            .describe("listen", "IP address of the server")
            .boolean("help")
            .describe("workspacetype")
            .alias("ws", "workspacetype")
            .describe("readonly", "Run in read only mode")
            .alias("ro", "readonly")
            .describe("packed", "Whether to use the packed version.")
            .boolean("packed")
            .default("packed", config.packed)
            .alias("a", "auth")
            .describe("auth", "Basic Auth username:password")
            .default("auth", ":")
            .describe("collab", "Whether to enable collab.")
            .default("collab", config.collab)
            // @lennartcl this should be moved
            .describe("lb.fileserver", "LogicBlox file server Url")
            .default("lb.fileserver", config.logicblox && config.logicblox.fileServerURL);
    }

  1. At the line .default("auth", ":"), type in the username and password you'd like to use in the format of username:password, e.g. .default("auth", "user:pass")

  2. You should be all set! Try accessing 11.22.33.44:3000, and there should be a pop-up prompting for username and password.

On a side note, if you wish to change the profile name (the default "John Doe"):

  1. Open the file /opt/cloud9/build/standalonebuild/settings/standalone.js.

  2. Locate the following code block.

user: {
            uid: 1,
            name: "johndoe",
            fullname: "John Doe",
            email: "[email protected]",
            pubkey: null
        },
  1. Change the the value of fullname to the username you want.

  2. Reboot BeagleBone Black and go to 11.22.33.44:3000, and you shall see updated profile name on your Cloud9 IDE.

1
  • 1
    I had to add the .default("auth", "user:pass") but it worked. Feb 28, 2016 at 15:54
3

When starting Cloud9 from the command line (at least with the latest version) you can use the:

-a user:pass

where "user" is the user name it will permit and "pass" is the password for that user. It uses basic web authentication.

Other parameters for Cloud9 are:

  • -l [ip addresses to accept] Use 0.0.0.0 to accept all IP addresses.
  • -w path/to/project/to/edit
  • -p port on which to operate

As for the particular script/service that is used to start Cloud9 in which to tweak the startup parameters, I'm not sure. You might try this information for where to start looking:

https://dcinglis.wordpress.com/2014/09/08/running-a-startup-script-on-a-beaglebone-black/

1
  • Do you know where the password is temporarily stored? Is it plain text?
    – abalter
    May 25, 2018 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.