Yocto Kirkstone - systemd_create_users issue on first build - embedded-linux

I'm building yocto kirkstone for the first time (previously built dunfell) for the boundary devices imx8mm. All the recipes build fine, but late in the rootfs process, I get the following errors in log.do_rootfs.xxx :
NOTE: Executing systemd_create_users ...
DEBUG: Executing shell function systemd_create_users
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
Usage: useradd [options] LOGIN
useradd -D
useradd -D [options]
Options:
--badnames do not check for bad names
-b, --base-dir BASE_DIR base directory for the home directory of the
new account
--btrfs-subvolume-home use BTRFS subvolume for home directory
-c, --comment COMMENT GECOS field of the new account
-d, --home-dir HOME_DIR home directory of the new account
-D, --defaults print or change default useradd configuration
-e, --expiredate EXPIRE_DATE expiration date of the new account
-f, --inactive INACTIVE password inactivity period of the new account
-g, --gid GROUP name or ID of the primary group of the new
account
-G, --groups GROUPS list of supplementary groups of the new
account
-h, --help display this help message and exit
-k, --skel SKEL_DIR use this alternative skeleton directory
-K, --key KEY=VALUE override /etc/login.defs defaults
-l, --no-log-init do not add the user to the lastlog and
faillog databases
-m, --create-home create the user's home directory
-M, --no-create-home do not create the user's home directory
-N, --no-user-group do not create a group with the same name as
the user
-o, --non-unique allow to create users with duplicate
(non-unique) UID
-p, --password PASSWORD encrypted password of the new account
-r, --system create a system account
-R, --root CHROOT_DIR directory to chroot into
-P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files
-s, --shell SHELL login shell of the new account
-u, --uid UID user ID of the new account
-U, --user-group create a group with the same name as the user
groupadd: GID '65534' already exists
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
useradd: invalid user ID '65534:65534'
groupadd: group 'adm' already exists
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
groupadd: group 'utmp' already exists
groupadd: group 'audio' already exists
groupadd: group 'cdrom' already exists
groupadd: group 'dialout' already exists
groupadd: group 'disk' already exists
groupadd: group 'input' already exists
groupadd: group 'kmem' already exists
groupadd: group 'kvm' already exists
groupadd: group 'lp' already exists
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
groupadd: group 'tape' already exists
groupadd: group 'tty' already exists
groupadd: group 'video' already exists
groupadd: group 'users' already exists
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
useradd: user 'messagebus' already exists
groupadd: group 'systemd-journal' already exists
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
useradd: user 'systemd-network' already exists
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
useradd: user 'systemd-resolve' already exists
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
useradd: user 'systemd-timesync' already exists
DEBUG: Shell function systemd_create_users finished
I haven't modified the systemd_create_users() function, and the *.conf files from which it pulls users have not been modified by me. I also cannot find any reference to SYSLOG_SU_ENAB, which seems to be the crux of the issue here.
Any thoughts?

I solved this. While it's not clear what happened exactly, it seems I had user-creation and modification entries in multiple recipes. I removed all of these and it built successfully.
Then I re-added the USERADD_PARAM and GROUPADD_PARAM definitions to one recipe and it also built successfully.
I then moved the EXTRA_USERS_PARAMS to the layer configuration, which is where this must be implemented.

Related

ansible-galaxy install ahuffman.resolv does not work

I thought I had found something that would make managing the /etc/resolv.conf file easy. https://galaxy.ansible.com/ahuffman/resolv but when I try to install this role as per the documentation like so ...
bash-3.2$ ansible-galaxy install ahuffman.resolv
I get this error ...
Starting galaxy role install process
[WARNING]: - ahuffman.resolv was NOT installed successfully: Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error [SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)>
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
I have never used ansible-galaxy before ... and probably won't ever again :(
Please help.
If I run with -vvvv I see this additional output:
ansible-galaxy 2.10.5
config file = None
configured module search path = ['/Users/red/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ansible
executable location = /Library/Frameworks/Python.framework/Versions/3.6/bin/ansible-galaxy
python version = 3.6.8 (v3.6.8:3c6b436a57, Dec 24 2018, 02:04:31) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
No config file found; using defaults
Starting galaxy role install process
Processing role ahuffman.resolv
Initial connection to galaxy_server: https://galaxy.ansible.com
Opened /Users/red/.ansible/galaxy_token
Calling Galaxy at https://galaxy.ansible.com/api/
[WARNING]: - ahuffman.resolv was NOT installed successfully: Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error [SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)>
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
Running with --ignore-certs seems to have fixed the problem but the usage from anisble-galaxy does mention a --ignore-certs option:
usage: ansible-galaxy [-h] [--version] [-v] TYPE ...
Perform various Role and Collection related operations.
positional arguments:
TYPE
collection Manage an Ansible Galaxy collection.
role Manage an Ansible Galaxy role.
optional arguments:
--version show program's version number, config file location,
configured module search path, module location, executable
location and exit
-h, --help show this help message and exit
-v, --verbose verbose mode (-vvv for more, -vvvv to enable connection
debugging)

Logstash install error: can't get unique system GID (no more available GIDs)

I am trying to install logstash with yum on a red hat vm, I already have the logstash.repo file setup according to the guide and i ran
yum install logstash
but I get the following error after it downloads everything
...
logstash-2.3.2-1.noarch.rpm | 72 MB 00:52
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
groupadd: Can't get unique system GID (no more available GIDs)
useradd: group 'logstash' does not exist
error: %pre(logstash-1:2.3.2-1.noarch) scriptlet failed, exit status 6
Error in PREIN scriptlet in rpm package 1:logstash-2.3.2-1.noarch
error: install: %pre scriptlet failed (2), skipping logstash-1:2.3.2-1
Verifying : 1:logstash-2.3.2-1.noarch 1/1
Failed:
logstash.noarch 1:2.3.2-1
Complete!
I can't find much information about this. Any suggestions?
groupadd determines gids for the creation of regular groups from the /etc/login.defs file.
In my centos 6 box. /etc/login.defs contains following two lines:
#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 500
GID_MAX 60000
For system accounts add these two lines to your /etc/login.defs
# System accounts
SYS_GID_MIN 100
SYS_GID_MAX 499
I updated the SYS_GID_MAX Value and it worked for me.

Getting error while starting the Cygwin

I am new to Cygwin.. Could you please help me, what is wrong here..
Administrator#demosrv /cygdrive/C/Program Files (x86)/GCTI/lfm/utilities
$ "C:/cygwin/cygrun.bat" bash "C:/cygwin/cygwin_setup.sh" administrator "superadmin"
cygwin warning:
MS-DOS style path detected: C:\cygwin\home\Administrator/.bashrc
Preferred POSIX equivalent is: /home/Administrator/.bashrc
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
*** Query: Overwrite existing /etc/ssh_config file? (yes/no) yes
*** Info: Creating default /etc/ssh_config file
*** Query: Overwrite existing /etc/sshd_config file? (yes/no) yes
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Info: Updating /etc/sshd_config file
*** Info: Sshd service is already installed.
*** Warning: Couldn't change owner of /etc/ssh_config!
*** Warning: Couldn't change owner of /etc/sshd_config!
*** Warning: Couldn't change owner of /etc/ssh_host_dsa_key!
*** Warning: Couldn't change owner of /etc/ssh_host_ecdsa_key!
*** Warning: Couldn't change owner of /etc/ssh_host_ed25519_key!
*** Warning: Couldn't change owner of /etc/ssh_host_key!
*** Warning: Couldn't change owner of /etc/ssh_host_rsa_key!
*** Warning: Couldn't change owner of /etc/ssh_host_dsa_key.pub!
*** Warning: Couldn't change owner of /etc/ssh_host_ecdsa_key.pub!
*** Warning: Couldn't change owner of /etc/ssh_host_ed25519_key.pub!
*** Warning: Couldn't change owner of /etc/ssh_host_key.pub!
*** Warning: Couldn't change owner of /etc/ssh_host_rsa_key.pub!
*** Warning: Couldn't change owner of /var/empty!
*** Warning: Couldn't change owner of /var/log/lastlog!
*** Warning: Couldn't change owner of important files to Administrator
Administrator!
*** Warning: This may cause the sshd service to fail! Please make sure that
*** Warning: you have suufficient permissions to change the ownership of files
*** Warning: and try to run the ssh-host-config script again.
*** Warning: Host configuration exited with 14 errors or warnings!
*** Warning: Make sure that all problems reported are fixed,
*** Warning: then re-run ssh-host-config.
System error 1069 has occurred.
The service did not start due to a logon failure.
For your information i used my windows username and password here..
Please let me know if you need any further details from me..
Click Start, click Run, type gpedit.msc, and then click OK.
Expand Local Computer Policy, expand Computer Configuration, expand Windows
Settings, expand Security Settings, expand Local policies, and then click User Rights Assignment.
Double-click Log on as a batch job, click Add user or group, type the name of the service account, and then click OK two times.
Double-click Log on as a service, click Add user or group, type the name of the service account, and then click OK two times.
Source : https://social.msdn.microsoft.com/Forums/sqlserver/en-US/cb9cbc5c-b2f9-4656-97e9-f69542c0b10f/an-error-1069-the-service-did-not-start-due-to-logon-failure-occurred-while-performing-this?forum=sqldatabaseengine

Chef is unable to find encrypted_data_bag_secret on Windows

I am unable to load secrets from my encrypted data bag on Windows. I have copied the file to c:\chef\encrypted_data_bag_secret, which is the default path.
I first tried this:
credentials = Chef::EncryptedDataBagItem.load("system", "deploy")
This failed with this error:
10.0.1.20 [2014-09-12T19:51:45+00:00] FATAL: ArgumentError: No secret specified
to load_secret and no secret found at C:\chef\encrypted_data_bag_secret
I then attempted to specify it explicitly:
secret = Chef::EncryptedDataBagItem.load_secret("c:/chef/encrypted_data_bag_secret")
credentials = Chef::EncryptedDataBagItem.load("system", "deploy", secret)
This also failed:
10.0.1.20 [2014-09-12T19:53:18+00:00] FATAL: Errno::ENOENT: No such file or directory - file not found 'c:/chef/encrypted_data_bag_secret'
Finally, I tried specifying backslashes in case this didn't work:
secret = Chef::EncryptedDataBagItem.load_secret("c:\\chef\\encrypted_data_bag_secret")
credentials = Chef::EncryptedDataBagItem.load("system", "deploy", secret)
And that also failed:
10.0.1.20 [2014-09-12T19:54:49+00:00] FATAL: Errno::ENOENT: No such file or directory - file not found 'c:\chef\encrypted_data_bag_secret'
I've tried also editing the permissions so everyone can view the encrypted_data_bag_secret file but this had no effect. Surely there is something very obvious I'm missing here.
I am running chef-client as an administrator.
I created a text file to contain the secret over an RDP session, but forgot that the default in Windows Explorer is to not show the file extension. Once I renamed the file to have the correct name and extension, it started working as expected.

Pacemaker - inconsistent data bewteen crm_resource resource list and CIB content

I added a resource and then deleted it afterwards.
However, when I issue the following command:
crm_resource -l
It is still listed! I try to remove it:
crm configure delete <resource_name>
I get the following error:
ERROR: object <resource_name> does not exist
Moreover:
crm configure show | grep <resource_name>
doesn't match any resource of that name! CIB also doesn't have it listed under LRM...
Any idea how to get rid of this resource?
Thanks,
D.
This seems to be "normal" in Pacemaker 1.1.6 - if you tell it delete something, it will delete it and then complain to you that it no longer exists.

Resources