Comments (8)
With passwords like that it's no surprise that you can't login! 🤣
Seriously, the issue is that your passwords have dollar signs in them ($
). As you may know, bash uses the dollar sign to indicate a variable.
Since you're using plugins on the command line those dollar signs are subject to bash interpretation, so your password got changed. For free!
One handy feature of the user
plugin is the log=/path/on/host/to/logfile
where it logs what it actually found. FYI, the log is written in Phase 0, but the actual work is done in Phase 1. A bit confusing, but once you know, you know.
I used the log
argument and saw that your passwords were modified. Here's a snippet from the user plugin log. First entry was using your command line as is, second was after I implemented the first solution below.
Date Operation User/Group IMG/Hostname
2024-05-31 14:37:00 Add User cord 2024-03-15-raspios-bookworm-arm64-lite.img
password:m&TWq6SD#xMK4YunNB homedir:/home/cord
groups:dialout,cdrom,floppy,audio,video,plugdev,users,adm,sudo,users,input,netdev,spi,i2c,gpio
2024-05-31 14:39:37 Add User cord 2024-03-15-raspios-bookworm-arm64-lite.img
password:m&TWq6SD#xM$6K4YunNB homedir:/home/cord
groups:dialout,cdrom,floppy,audio,video,plugdev,users,adm,sudo,users,input,netdev,sp
There are two solutions:
- Leave the command line as is, but quote the
$
as\$
. This will prevent bash from mangling your passwords. - Use
--plugfile @/path/to/pluglist
on the command line and create /path/to/pluglist with all your plugins in it:
user:adduser=cord|password=m&TWq6SD#xM$6K4YunNB
user:adduser=ansible|password=J$orK7q9Ai#Gumq%PTmU
L10n:host
disables:piwiz
With this, the lines are read and not subject to bash substitutions, so the \
quotes are not needed, and in fact, will be treated as part of the password.
I use the --plugfile @pluglist
for my own build, because it keeps the sdm command lines more manageable, and it's easier to scan the pluglist to see what's there, or not.
Oh, and to answer your specific questions:
- Yes, you can add multiple users, and the way you're doing it is fine, except for a little bash password mangling
- sdm doesn't impose any restrictions beyond those of RasPiOS, so no.
from sdm.
Thank you, very helpful - I figured as much and should have tried. Hopefully this helps someone else.
from sdm.
Sorry to bother, but now working on another NVMe and wanted to try plugfile option, but can't seem to get it to work. I searched the docs, checked the --help and also searched the source and can't seem to find how --plugfile is supposed to work:
sudo sdm --customize --plugfile /home/cord/plugfile.txt --regen-ssh-host-keys --restart 2024-03-15-raspios-bookworm-arm64-lite.img
gets me
sdm: unrecognized option '--plugfile'
Using sdm V12.2
from sdm.
Ooops...my bad! It's --plugin @/path/to/plugfile.txt
. Sorry about that! And, the file type doesn't need to be '.txt' it's just a Linux file. I use myplugins
with no file type whatsoever.
from sdm.
from sdm.
Great, and I note that the plugfile has to be executable. That worked like a charm.
I don't believe that it needs to be executable. It's only read by sdm running as root, not executed.
from sdm.
Here's what I am using
sudo sdm --customize --plugin /home/cord/plugfile --regen-ssh-host-keys --restart 2024-03-15-raspios-bookworm-arm64-lite.img
If i leave plugfile as rw, then I get this error:
? Plugin /home/cord/plugfile is not executable
from sdm.
Try this instead:
sudo sdm --customize --plugin @/home/cord/plugfile ...
You're missing the @
at the front of the plugfile list path, so sdm assumes that the file is a plugin, and plugins must be executable. On the other hand, lists of plugins, denoted with @
, are read as text files and do not need to be executable.
from sdm.
Related Issues (20)
- Multiline plugin notes HOT 2
- Dump kernel image and DBT HOT 2
- More complex settings (pi ups) HOT 2
- Boot from nvme? HOT 2
- Hyphens and underscores in hostname HOT 4
- Error with --1piboot option HOT 1
- `invalid user` when using chown with custom user HOT 8
- Multiple sdm customize runs HOT 8
- Are plugin arguments robust to whitespace? HOT 15
- Can't set wifi ssid and password in the burn phase HOT 4
- Specify wlan1 instead of wlan0? HOT 3
- Get Luks key from OTP? HOT 1
- Installing on Fedora / Arch? HOT 3
- Network plugin fails to add wifi if nmconnections manually added previously HOT 5
- Example of installing SyncThing through SDM? HOT 21
- System don't boot after encryption - /dev/mapper/cryptroot does not exist HOT 14
- How to best update sdm? HOT 3
- apt returned an error; review /etc/sdm/apt.log --> /etc/sdm/apt.log does not exist HOT 10
- Steps to install zerotier using sdm HOT 9
- Additional configuration of (user-specific) ssh HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdm.