Comments (17)
sdm does not provide an integrated function to rename the pi user. You can, however, create a new user with the --user
switch, which creates a user that you can customize as you desire.
In recent RasPiOS builds and all builds going forward, the Pi user comes without a password, and is thus unusable unless you change the password.
If you really want to rename the pi user for some specific reason, you can do so in a custom phase script or a plugin. Something like this in the Phase 1 code should work:
usermod --login myusername --home /home/myusername pi
Alternatively, you can use the sdm --user
switch to create a new user, and then simply userdel pi
, or just leave it, since the account can't be used, as I mentioned above. Personally, I always create a new user, and leave the pi user as is, and have never had an issue.
If you set up the user (using either method) as you'd like, and also set the localization settings (using either --l10n
, or --keyboard
, --locale
, --timezeone
, and --wifi-country
) you can also add --disable piwiz
, which will disable the stuff that RasPiOS runs at first boot to query you for all of these settings. Why do something manually that can be automated? 🤔
EDIT: Thinking about this further...it's easy enough to add a switch to rename the Pi user. If you feel that it would improve your experience and usage with sdm, please let me know and I'll drop it in the next update.
from sdm.
This would help. Thank you.
I've use the pi-gen & rp-imageri feature to simplify nfs share permissions across different systems.
from sdm.
I've implemented a --rename-pi
switch, and it will be in the next version...coming next week.
I do have a couple of questions for you. These will help me understand what you're doing, and I may be able to offer you other sdm-usage suggestions, or you may enlighten me on some useful sdm ideas.
- Sounds like you've been using pi-gen? if that's the case, what is your interest in sdm? Is this instead of pi-gen, or in addition to? What can you do in sdm that you can't do in pi-gen?
- Could you expand on how you "simplify nfs share permissions?" I'm curious because I use nfs on my network but basically have all shares open to all systems on my LAN. That's really easy to do with sdm, including setting up common UID/GIDs across all the systems. Is that what you're doing, or are you doing something more complex?
Thanks!
from sdm.
This is instead of pi-gen. My intention is to build multiple images for a PI cluster. The cluster will comprise of 4 Raspberry PI4s and a Raspberry CM4. The CM4 will act as a switch, firewall, router and network boot host.
I wish to make the setup & config automated across Debian updates, while maintaining as few files as i can.
sdm seem like it will help me to achieve this.
"including setting up common UID/GIDs across all the systems. Is that what you're doing,"
Yes and with ssh / gpg key management.
from sdm.
Thanks for that! I believe that sdm will help you reduce the config file maintenance. My own personal stuff for sdm consists of:
- A bash script to run the sdm customize. I'll be updating the wiki with a newer example in the next few days, incorporating plugins, which made several things easier
- A personal plugin to do all the customizations that sdm doesn't directly support, such as copying my login files and configuring my NFS shares. This will be updated on the wiki as well
Yep, just two files for my own customized sdm usage.
Several of the plugins included with sdm started out in my personal customizations, but once plugins were implemented, I migrated them to plugins so they can be more easily used by others (e.g., apt-cacher-ng, apt-file, and others coming in the next version).
I encourage you to use plugins liberally, as they provide the ability to easily add/remove capabilities in a modular fashion. Also, they can be used both when customizing the IMG (so all burn targets get the common features) or when burning (for only specific targets). This is handy, for instance when setting up servers with different functionality.
Your use case sounds interesting! If you run into situations where an addition to sdm would be helpful, let me know. I'm always looking for good ideas to incorporate, or maybe the capability is already there! 🤔
from sdm.
The next feature I expect to be looking for is to output a output/${rootfs},${bootfs}/ directory structure with the --burn parameter to facilitate network booting.
from sdm.
hmm...I've done tftp network booting with x64 systems, but never with the Pi. Are you thinking of a single directory structure for all Pis, or one tree per pi? If the former, how are the per-system items, such as the hostname, applied?
from sdm.
I am testing by using sdm --mount and copying the files.
my tree currently looks like :-
/srv/tftp/${pi-mac-address}/bootfs/
&
/srv/ntfs/${pi-hostname}/rootfs/
from sdm.
Ah, cool. I was going to suggest that. There's also the --directory
switch that lets sdm operate directly on a directory tree. Full disclosure: I haven't tested it in a while, but it should work. If you give it a go and it falls over, LMK that I broke it 🙄
from sdm.
this is my fork that I'm experimenting in my fork https://github.com/1stcall/sdm
take a look at my customize.sh, burnfile.sh & sdm-customphase for my current tests.
very much a WIP!
from sdm.
Looks like you'll be explaining to me how this all works fairly soon!
from sdm.
lol. Have a look at my repo https://github.com/1stcall/build-kernel
I'm working on including a custom kernel and packaging it as a .deb
I then intend to use sdm to install it on my images.
from sdm.
I like the look of the plugins. I'll play around with them soon.
from sdm.
sdm is updated with a --rename-pi
switch, which renames the pi user. Please validate that it works for you.
from sdm.
I can confirm this works well. Thank you.
from sdm.
Also, I'm loving the plugins. They have significantly simplified things for me and work very well.
from sdm.
Great, thanks for confirming. I'm loving the plugins as well. Glad you find them helpful and simplifying also!
from sdm.
Related Issues (20)
- Extend 'apps' plugin to allow removal of packages HOT 8
- satrim trim-enable: Cannot find /sys/block/nvme0n1 HOT 6
- Error mounting after successful burn rpi5 NVMe HOT 32
- making installing apps faster HOT 43
- Changing the splash screen HOT 10
- Firstboot overlayfs HOT 10
- systemd-nspawn issue on debian 12 guest / M2 MacBook Pro host HOT 22
- Error when mounting img HOT 10
- parted plugin - Internal error: File '//sdm-cparse' not found in readparams HOT 3
- keymap not being set HOT 6
- [Systemctl service won't start] HOT 3
- /etc/skel sub-directories are not propogated to new user HOT 5
- Error mounting IMG (wrong fs type, bad option, bad superblock) HOT 22
- OrangePi OS support HOT 4
- `runatboot` scripts don't run (FirstBoot: Skip Custom FirstBoot Scripts) HOT 12
- Exit codes when "Image cannot be shrunk any further" HOT 3
- EZsdmInstaller does not include the rsync package HOT 5
- still prompting for keyboard and user at first boot HOT 2
- copyfile source file collision HOT 7
- Error on customizing and exploring image HOT 6
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.