From 33d810c2ba1efe65b17d571ba05dd4b10ae28a68 Mon Sep 17 00:00:00 2001 From: TuningYourCode Date: Wed, 12 Feb 2025 22:33:13 +0100 Subject: [PATCH] Add support for uid on user objects --- docs/cloud-config.5.md | 2 ++ src/ccmodules/users.c | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/cloud-config.5.md b/docs/cloud-config.5.md index 10587b6..74bac63 100644 --- a/docs/cloud-config.5.md +++ b/docs/cloud-config.5.md @@ -185,6 +185,8 @@ ssh-authorized-keys|string[]|no |Add SSH public keys to ssh configuration sudo |string[] |no |Add sudoers lines for this account, the account | | |name is automatically prepended system |boolean |no |Make the account a system account +uid |string |no |User ID, when not given system will + | | |determine and use the next free one ``` ### write_files diff --git a/src/ccmodules/users.c b/src/ccmodules/users.c index cf645de..89b12ba 100644 --- a/src/ccmodules/users.c +++ b/src/ccmodules/users.c @@ -74,6 +74,7 @@ static struct users_options_data users_options[] = { {"ssh-authorized-keys", NULL, NULL }, {"sudo", NULL, NULL }, {"system", users_add_option_format, " -r " }, + {"uid", users_add_option_format, " -u '%s' " }, {NULL} };