← Back to team overview

ubuntu-bugcontrol team mailing list archive

[Merge] ~elisehdy/ubuntu-qa-tools:uvt-username-fix into ubuntu-qa-tools:master

 

Elise Hlady has proposed merging ~elisehdy/ubuntu-qa-tools:uvt-username-fix into ubuntu-qa-tools:master.

Commit message:
VM's for Jammy and older releases don't like usernames with non-alphanumerics.
Splits string on the '.' for email-style usernames.

Requested reviews:
  Ubuntu Security Team (ubuntu-security)

For more details, see:
https://code.launchpad.net/~elisehdy/ubuntu-qa-tools/+git/ubuntu-qa-tools/+merge/486873
-- 
Your team Ubuntu Bug Control is subscribed to branch ubuntu-qa-tools:master.
diff --git a/vm-tools/uvt b/vm-tools/uvt
index a10a804..683ce0a 100755
--- a/vm-tools/uvt
+++ b/vm-tools/uvt
@@ -3622,7 +3622,7 @@ def load_uvt_config():
 
     # Set a default username and password
     if config.get('vm_username', "") == "":
-        config['vm_username'] = pwd.getpwuid(os.getuid())[0].split("@")[0]
+        config['vm_username'] = pwd.getpwuid(os.getuid())[0].split(".")[0]
 
     if not 'vm_password' in config:
         # Yes, this is a hardcoded password! ZOMG, everybody panic!

Follow ups