Config XML file validation fails with the below error when the "password" attribute for a user is not set when attempting to create an Ubuntu Focal image.:
$ sudo kiwi-ng --logfile=./my_log.log --type=oem --profile=Disk system build --description=<path_to_config_file>/ubuntu-focal/ --target-dir=./my_img
[ INFO ]: 10:26:56 | Loading XML description
[ INFO ]: 10:26:56 | Support for XML markup available
[ INFO ]: 10:26:57 | RelaxNG validation failed. See jing report:
[ INFO ]: 10:26:57 | --> /tmp/xslt-m4p_uxze:24:74: error: element "user" missing required attribute "password"
/tmp/xslt-m4p_uxze:25:76: error: element "user" missing required attribute "password"
[ ERROR ]: 10:26:57 | KiwiDescriptionInvalid: Failed to validate schema and/or schematron rules
Expected behaviour
Because documentation states that only the following 2 attributes are mandatory for user creation:
"
a)name: the UNIX username
b)home: the path to the user’s home directory"
(source: https://documentation.suse.com/kiwi/9/pdf/kiwi_color_en.pdf, p.37, 38)
"
and that the "password" attribute is optional, I was expecting to be able to create the image with the following 2 users specified in the config.xml file:
Edit the "user" section of the following Config XML file so that it only contains the "name" and "home" attributes:
$ vim kiwi-descriptions/ubuntu/x86_64/ubuntu-focal/config.xml
Try to create an Ubuntu Focal image by executing the following command:
$ sudo kiwi-ng --logfile=./my_log.log --type=oem --profile=Disk system build --description=<path_to_templates>/kiwi-descriptions/ubuntu/x86_64/ubuntu-focal/ --target-dir=./my_img
You should see the attempt fail with the following error message:
error: element "user" missing required attribute "password"
Problem description
Config XML file validation fails with the below error when the "password" attribute for a user is not set when attempting to create an Ubuntu Focal image.:
Expected behaviour
Because documentation states that only the following 2 attributes are mandatory for user creation: " a)name: the UNIX username b)home: the path to the user’s home directory" (source: https://documentation.suse.com/kiwi/9/pdf/kiwi_color_en.pdf, p.37, 38) " and that the "password" attribute is optional, I was expecting to be able to create the image with the following 2 users specified in the config.xml file:
Steps to reproduce the behaviour
$ vim kiwi-descriptions/ubuntu/x86_64/ubuntu-focal/config.xml
$ sudo kiwi-ng --logfile=./my_log.log --type=oem --profile=Disk system build --description=<path_to_templates>/kiwi-descriptions/ubuntu/x86_64/ubuntu-focal/ --target-dir=./my_img
You should see the attempt fail with the following error message:error: element "user" missing required attribute "password"
OS and Software information