Comment 0 for bug 1785292

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

There are scenarios where organizations customize user and group management on the target operating system. For example, default /etc/nsswitch.conf may be customized to avoid local users completely and for users to only come from an identity management system integrated via PAM.

http://man7.org/linux/man-pages/man5/nsswitch.conf.5.html (i.e. no "files" or "compat" directives)

In a scenario where an organization has a huge directory, having an "ubuntu" user and "ubuntu" group is not possible and other account names are used instead. Moreover, it case of remote user and group management it is not possible to add local users to remote groups or remote users to local groups.

Juju should avoid usage of "ubuntu@" and "ubuntu:ubuntu" and let an administrator to configure which users will be used during bootstrap, machine provisioning and during any other operations.

cloudconfig/userdatacfg_unix.go: // ubuntu:ubuntu from root:root so the juju-run command run as the ubuntu
cloudconfig/userdatacfg_unix.go: fmt.Sprintf("(id ubuntu &> /dev/null) && chown ubuntu:ubuntu %s", lockDir),

cmd/plugins/juju-upgrade-mongo/upgrade.go: cmd := exec.Command("ssh", []string{"-o StrictHostKeyChecking=no", fmt.Sprintf("ubuntu@%s", machine), "sudo -n bash -c " + utils.ShQuote(script)}...)
environs/manual/sshprovisioner/init_test.go: defer installFakeSSH(c, "", "", 1)() // simulate failure of ubuntu@ login
environs/manual/sshprovisioner/init_test.go: defer installFakeSSH(c, "", "", 1)() // simulate failure of ubuntu@ login
environs/manual/sshprovisioner/sshprovisioner.go: cmd := ssh.Command("ubuntu@"+host, []string{"sudo", "-n", "true"}, nil)
environs/manual/sshprovisioner/sshprovisioner.go: cmd := ssh.Command("ubuntu@"+host, []string{"/bin/bash"}, nil)
environs/manual/sshprovisioner/sshprovisioner.go: cmd := ssh.Command("ubuntu@"+host, []string{"/bin/bash"}, nil)

...

provider/manual/environ.go: "ubuntu@"+e.host,
provider/manual/environ.go: "ubuntu@"+e.host,
state/backups/restore.go: userAddr := "ubuntu@" + addr