Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8621

Raspberry Pi OS • Re: I could use some cloud-init help

$
0
0
If the "blsxyz" user doesn't exist at all, then I think the actual failure was a step earlier, when it invoked:

Code:

['/usr/lib/userconf-pi/userconf', 'blsxyz', '<password-hash-here>']
Looking at that script, it doesn't "set -e" (or perform any error checking), so failures are swallowed. It's supposed to rename the default user to your chosen username. The error you see is probably a symptom of this rename failing.

It's also perhaps telling that the usermod man page calls out:
You must make certain that the named user is not executing any processes when this command is being executed if the user's numerical user ID, the user's name, or the user's home directory is being changed. usermod checks this on Linux.
So if I had to guess, I'd say somehow a process is running as the default user when the script tries to rename it.

You might have some luck trying to run the commands manually (and checking return codes) to see if they produce a more useful error (you'll have to ssh to the box as a different user to do this, because of the caveat above!):

Code:

getent passwd 1000 | cut -d: -f1 # presumably should return "root" or "ubuntu" or somethingusermod -l "blsxyz" "$(getent passwd 1000 | cut -d: -f1)" # I guess this is failing for some reason - does it fail when you run it manually?

Statistics: Posted by davidje13 — Wed Dec 10, 2025 2:06 am



Viewing all articles
Browse latest Browse all 8621

Trending Articles