File: use-identity-section-when-installing-ubuntu.patch

package info (click to toggle)
virtualbox 7.2.4-dfsg-3
  • links: PTS, VCS
  • area: contrib
  • in suites: sid
  • size: 619,504 kB
  • sloc: cpp: 2,386,220; ansic: 2,351,736; asm: 380,287; python: 235,275; xml: 89,706; sh: 25,715; makefile: 8,169; perl: 5,697; java: 5,337; cs: 4,872; pascal: 1,785; javascript: 1,692; objc: 1,131; lex: 931; sed: 921; php: 906; yacc: 707
file content (68 lines) | stat: -rw-r--r-- 2,372 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Description: Use identity section when installing Ubuntu unattended
 The installer for Ubuntu 26.04 now has the ability to create users before first
 boot. This will fix the inability to install unattended when Guest Additions
 are also installed (see ticketref:22278).
 .
 But for that to work, we need the user parameters to be specified in the
 identity section, not in the user-data section (which is processed by
 cloud-init on first boot).
 .
 ticketref:22278
 .
 This reverts commit 911ce9e.
Author: Olivier Gayot <olivier.gayot@canonical.com>
Bug: https://www.virtualbox.org/ticket/22278
Bug-Ubuntu: https://launchpad.net/bugs/2090834
Forwarded: https://github.com/VirtualBox/virtualbox/pull/439
Last-Update: 2025-12-15
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
diff --git a/src/VBox/Main/UnattendedTemplates/ubuntu_autoinstall_user_data b/src/VBox/Main/UnattendedTemplates/ubuntu_autoinstall_user_data
index 73953528978..5b096edc5ba 100644
--- a/src/VBox/Main/UnattendedTemplates/ubuntu_autoinstall_user_data
+++ b/src/VBox/Main/UnattendedTemplates/ubuntu_autoinstall_user_data
@@ -10,6 +10,12 @@ autoinstall:
   keyboard:
     layout: us
 
+  identity:
+    realname: '@@VBOX_INSERT_USER_FULL_NAME@@'
+    username: '@@VBOX_INSERT_USER_LOGIN@@'
+    password: '@@VBOX_INSERT_USER_PASSWORD_SHACRYPT512@@'
+    hostname: '@@VBOX_INSERT_HOSTNAME_WITHOUT_DOMAIN@@'
+
   shutdown: reboot
 
   storage:
@@ -40,7 +46,7 @@ autoinstall:
   # Additional cloud-init configuration affecting the target system can be supplied
   # underneath a user-data section inside of autoinstall.
   user-data:
-    hostname: '@@VBOX_INSERT_HOSTNAME_WITHOUT_DOMAIN@@'
+
     users:
       - name: root
         primary_group: root
@@ -49,19 +55,6 @@ autoinstall:
         passwd: '@@VBOX_INSERT_USER_PASSWORD_SHACRYPT512@@'
         uid: 0
 
-      - name: '@@VBOX_INSERT_USER_LOGIN@@'
-        gecos: '@@VBOX_INSERT_USER_LOGIN@@'
-        primary_group: '@@VBOX_INSERT_USER_LOGIN@@'
-@@VBOX_COND_IS_INSTALLING_ADDITIONS@@
-        groups: sudo, vboxsf
-@@VBOX_COND_END@@
-@@VBOX_COND_IS_NOT_INSTALLING_ADDITIONS@@
-        groups: sudo
-@@VBOX_COND_END@@
-        lock-passwd: false
-        shell: /bin/bash
-        passwd: '@@VBOX_INSERT_USER_PASSWORD_SHACRYPT512@@'
-
 @@VBOX_COND_IS_RTC_USING_UTC@@
     timezone: Etc/UTC
 @@VBOX_COND_END@@
-- 
2.43.0