ubuntu user not in correct groups

Bug #1044044 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
High
Unassigned
cloud-init (Ubuntu)
Fix Released
High
Unassigned

Bug Description

$ groups ubuntu
ubuntu : ubuntu

The ubuntu user is not being added to the same set of groups he has been previously added to

==== i=/archive/mirrors/uec/releases/precise/release/ubuntu-12.04-server-cloudimg-amd64.tar.gz ====
adm:x:4:ubuntu
dialout:x:20:ubuntu
cdrom:x:24:ubuntu
floppy:x:25:ubuntu
audio:x:29:ubuntu
dip:x:30:ubuntu
video:x:44:ubuntu
plugdev:x:46:ubuntu
netdev:x:110:ubuntu
admin:x:111:ubuntu
ubuntu:x:1000:

==== i=/archive/mirrors/uec/releases/lucid/release/ubuntu-10.04-server-cloudimg-amd64.tar.gz ====
adm:x:4:ubuntu
dialout:x:20:ubuntu
cdrom:x:24:ubuntu
floppy:x:25:ubuntu
audio:x:29:ubuntu
dip:x:30:ubuntu
video:x:44:ubuntu
plugdev:x:46:ubuntu
ubuntu:x:1000:
admin:x:110:ubuntu

I'd suggest we need at very least to get the user into adm, admin. I think the safest thing to do is probably to default to just the same list as is present in 12.04.

I noticed this when trying to read /var/log/syslog as ubuntu user.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: cloud-init 0.7.0~bzr639-0ubuntu1
ProcVersionSignature: User Name 3.5.0-13.13-generic 3.5.3
Uname: Linux 3.5.0-13-generic x86_64
Architecture: amd64
Date: Thu Aug 30 20:05:52 2012
PackageArchitecture: all
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Changed in cloud-init (Ubuntu):
assignee: nobody → Ben Howard (utlemming)
importance: Undecided → High
status: New → Triaged
Changed in cloud-init:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Ben Howard (utlemming)
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Fixed this in the builder.

ben@padfoot:/work/automated-ec2-builds/live-config/common/hooks$ bzr diff
=== modified file 'live-config/common/hooks/030-create-users.chroot'
--- live-config/common/hooks/030-create-users.chroot 2012-08-27 21:22:41 +0000
+++ live-config/common/hooks/030-create-users.chroot 2012-08-30 21:13:39 +0000
@@ -16,7 +16,7 @@

 echo "Adding ubuntu user..."
 useradd -U -m ubuntu -c "Ubuntu" --shell /bin/bash
-usermod -a -G adm,admin,audio,cdrom,dialout,floppy,video,plugdev,dip,netdev ubuntu
+usermod -a -G adm,admin,audio,cdrom,dialout,floppy,video,plugdev,dip,netdev,sudo,ubuntu
 gpasswd -a ubuntu netdev
 echo "ubuntu:ubuntu" | chpasswd

Revision history for this message
Scott Moser (smoser) wrote :

Ben,
 I don't think its right to change that code there.
 a.) this probably (possibly) breaks 11.10 builds (which might not have the sudo user)
 b.) Its not a big enough issue to fix in 12.04. I'd leave it as it is there.

The bug I was really opening was just that the new cloud-init code was not putting the user in the groups that it had previously been in.

Revision history for this message
Scott Moser (smoser) wrote :

To be clear, I think its probably best to either revert your change you mentioned in #2 or wrap it in an "if dist_ge quantal".

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Scott,
I reverted change 2. Given that we've changed cloudinit, the fix for quantal is the MP.

Scott Moser (smoser)
Changed in cloud-init (Ubuntu):
status: Triaged → Fix Released
Changed in cloud-init:
status: Triaged → Fix Committed
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.