Jump to content

Картман

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. That's exactly what I did. I wrote a replacement for the .not_logged_in_yet file in my customize-image.sh with pre-set parameters, just like I create /root/provisioning.sh. I was just wondering if there were any other ways to do this.
  2. Hi everyone, I'm new to creating my own images and I'm learning this just because I'm interested in it. I am trying to build ubuntu 24.04 for my rpi3b using the build configuration for rpi4b. Now I'm trying to automate the process of the first launch (skip the selection of bash, zsh, creating a password for root, creating a regular user, etc.). In one of the topics, I found out that I can delete "rm -rf/root/.not_logged_in_yet" And the system will not ask for the initial setup, but to make all the necessary changes for me, I wrote a small function in customize-image.sh: SettingSystemFirtsRun() { #disable defaut script sudo rm -rf /root/.not_logged_in_yet #setting regul user echo "add user $_userName" sudo useradd -m -c -s /bin/bash "$_userName" "$_userName" -p "$_userPass" #change root pass echo 'change root passssss' echo "root:$_rootPass" | sudo chpasswd # Set hostname permanently echo "Setting hostname to $_Hostname" echo "$_Hostname" > /etc/hostname hostname -b "$_Hostname" # Update hosts file sed -i "s/127.0.1.1.*/127.0.1.1\t$_Hostname/g" /etc/hosts } But when the system starts, I still do not see the directory of the user I am creating in /home, while the user himself is being created. The most important thing is that I really want to implement user creation at the assembly stage, although I am less and less convinced that this is even possible... I do not rule out that there are more concise ways to solve this problem, so I will be glad of any advice, good luck to all. P.S. I read the documentation, but I couldn't find a solution there.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines