Page 1 of 2
WADS-specific Ubuntu username
Published: August 20, 2025 - 4:45 PM
by thomas789
Good morning,
We have configured our WADS to be able to deploy workstations running Ubuntu. The beginning of our basic cloud-config file is as follows:
Code: Select all
#cloud-config
autoinstall:
# version is an Autoinstall required field.
version: 1
identity:
hostname: {{hostname}}
username: monprenom
password: "monmdp"
locale: fr_FR.UTF-8
keyboard:
layout: fr
variant: oss
timezone: Europe/Paris
packages:
- ubuntu-desktop
- gdm3
- language-pack-fr
- language-pack-gnome-fr
...
As can be seen from the {{hostname}} parameter, the script will use the hostname specified during the PXE boot of the machine. But is it possible to do the same for the username (instead of "myfirstname"), so that after deployment the machine has the name we specified during the PXE boot and we don't have to run usermod commands after deployment (especially for the user's session name, display name, and home)?.
Thanks in advance,
Sincerely.
WADS-specific Ubuntu username
Published: August 21, 2025 - 4:20 PM
by blemoigne
Hello,
these won't be domain users.
WADS-specific Ubuntu username
Published: August 21, 2025 - 4:46 PM
by thomas789
Hello,
No, there are no domain users.
Best regards.
WADS-specific Ubuntu username
Published: August 22, 2025 - 4:55 PM
by blemoigne
Hello,
this could be handled by a package containing a dictionary {machine: user}. Depending on the machine, it would create the corresponding user.
Best regards,
Bertrand
WADS-specific Ubuntu username
Published: August 25, 2025 - 09:05
by thomas789
Hello,
thank you for your feedback. However, is this package available in the WAPT store? If so, how is it used?
Regards.
WADS-specific Ubuntu username
Published: August 25, 2025 - 12:11
by blemoigne
Good morning,
There is no existing package, but it could look something like this:
Code: Select all
from setuphelpers import *
def install():
userdict = {'machine1': 'user1', 'machine2': 'user2'}
user = userdict[host_info()['computer_name']]
And then perform all the actions of useradd/usermod with the retrieved user variable.
Best regards,
Bertrand
WADS-specific Ubuntu username
Published: August 25, 2025 - 12:18
by blemoigne
We could also use this package as a guide for encrypting the password:
https://wapt.tranquil.it/store/fr/detai ... _PROD.wapt
WADS-specific Ubuntu username
Published: August 26, 2025 - 2:37 PM
by thomas789
Hello,
OK, but isn't it possible to have two prompts at the start of the WAPT PXE? One asking for the hostname (as is already the case) and one asking for the username, so that it can be used in the cloud init configuration.
Thank you in advance, best regards.
WADS-specific Ubuntu username
Published: September 18, 2025 - 4:32 PM
by thomas789
Hello,
were you able to review my request?
Thank you in advance, best regards.
WADS-specific Ubuntu username
Published: September 19, 2025 - 9:29 PM
by sfonteneau
thomas789 wrote: ↑August 26, 2025 - 2:37 PM
Okay, but isn't it possible to have two prompts at the start of the WAPT PXE? One asking for the hostname (as is already the case) and one asking for the username, so that it can be used in the cloud init configuration.
Not currently.
We need to include "extra data" in WADs that could be used in templates. This extra data would be fed into the console. Currently, this isn't the case.
The most pragmatic solution in the meantime is to have the user join the domain and add the machine to the domain with an SSD (it works like Windows with local credential cache), so it seems like the most logical solution... Plus, it allows for automatic Kerberos authentication (coupled with Keycloak, it's perfect)