Amila Pathum Kandambi
Amila Pathum Kandambi

Reputation: 53

Cloud9 Password On Beaglebone Black

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

Upvotes: 2

Views: 968

Answers (1)

Thomas Hsieh
Thomas Hsieh

Reputation: 731

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.

Upvotes: 1

Related Questions