Jump to content

li ABB

Validating
  • Posts

    1
  • Joined

  • Last visited

  1. I am a developer from China and am not very familiar with English, so the following content is translated through Google Translate. When I successfully flash the image file of the built system onto the development board, the system seems to delete the directory under /home upon the first boot (from my observation). The build command being used ๏ผš./compile.sh build BOARD=firefly-rk3399 BRANCH=current BUILD_DESKTOP=no BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=focal This is an excerpt from customize-image.sh. Main() { case $RELEASE in stretch) # your code here # InstallOpenMediaVault # uncomment to get an OMV 4 image ;; buster) # your code here ;; bullseye) # your code here ;; bionic) # your code here ;; focal) # your code here echo "12345678" cjia_xxx ;; esac } # Main cjia_xxx() { rm /root/.not_logged_in_yet username=cjia pass=cjia # Check if user already exists. grep -q "$username" /etc/passwd if [ $? -eq $SUCCESS ] then echo "User $username does already exist." echo "please chose another username." exit $E_USEREXISTS fi #Preerequisite for mkpasswd : whois useradd -d /home/"$username" -m -g users -s /bin/bash "$username" #Allow no one else to access the home directory of the user chmod 750 /home/"$username" echo "$username":"$pass"|chpasswd echo "the account is setup" PUBLIC_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQsdfsdfsfsdfa6r2jUg5Wmnk7m97BccU+itsqEUe0IOUKslOdHlGQcos9APLEZk1jec/a/7eGCcCVfTNznW8Wskg+o/nyZDBCeQL7TMs5L2TlBoJpOudo42bxEp0lqTe8nS/cKPv3EZT0mMdFh3JbSqmF0eou6rbui0EjInzh9+CqB/fsuErunJ700N+uZ0l9dJ7Fofj1Ws1rptk0Ezer8YmIaDfvm4mFY7pQTHIqphqZ0IhBRXrBbL5XFv53cevvdfpkLA6y4LplWnIysdfsdfsdfsdeqG+r1licfbQYYqpACr8jFuv7T6Q2BaMfDF5AKZ8UeuIe66lFX+5MpD25WM+LamlEnBmh67d1SYOadSGBXC5RSs5Vp9hX1Nff2tfVN+kyvsfPe/v0D/ScJdqKCCR+w3SResv/aFZPW524tI32ehU1q7G2XYqdayxbA5QLjIxwo+NJn6Bc=" CJIA_HOME="/home/cjia" mkdir -p $CJIA_HOME/.ssh echo "$PUBLIC_KEY" >> $CJIA_HOME/.ssh/known_hosts chown cjia:cjia $CJIA_HOME/.ssh/known_hosts chmod 600 $CJIA_HOME/.ssh/known_hosts cat $CJIA_HOME/.ssh/known_hosts cd /home/cjia ls -al pwd su cjia -c "pwd" } Corresponding log output [๐Ÿณ|๐Ÿ”จ] the account is setup [๐Ÿณ|๐Ÿ”จ] chown: invalid group: โ€˜cjia:cjiaโ€™ [๐Ÿณ|๐Ÿ”จ] ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQsdfsdfsdfsdphekfmCKihCw5UKzXPhdeMxAsa6r2jUg5Wmnk7m97BccU+itsqEUe0IOUKslOdHlGQcos9APLEZk1jec/a/7eGCcCVfTNznW8Wskg+o/nyZDBCeQL7TMs5L2TlBoJpOudo42bxEp0lqTe8nS/cKPv3EZT0mMsdfsdfsdfsdEjInzh9+CqB/fsuErunJ700N+uZ0l9dJ7Fofj1Ws1rptk0Ezer8YmIaDfvm4mFY7pQTHIqphqZ0IhBRXrBbL5XFv53cevvdfpkLA6y4LplWnIyE5lqESVyp9m5Vj+rYMHdGTiIr2il2aN+xKcAeqG+r1licfbQYYqpACr8jFuv7T6Q2BaMfDF5AKZ8UeuIe66lFX+5MpD25WM+LamlEnBmh67d1SYOadSGBXC5RSs5Vp9hX1Nff2tfVN+kyvsfPe/v0D/ScJdqKCCR+w3SResv/sdfsdfsdfsdyxbA5QLjIxwo+NJn6Bc= cjia@DESKTOP-T9MJO61 [๐Ÿณ|๐Ÿ”จ] total 12 [๐Ÿณ|๐Ÿ”จ] drwxr-x--- 3 cjia users 120 Mar 26 12:41 . [๐Ÿณ|๐Ÿ”จ] drwxr-xr-x 3 root root 60 Mar 26 12:41 .. [๐Ÿณ|๐Ÿ”จ] -rw-r--r-- 1 cjia users 220 Feb 25 2020 .bash_logout [๐Ÿณ|๐Ÿ”จ] -rw-r--r-- 1 cjia users 3771 Mar 26 12:28 .bashrc [๐Ÿณ|๐Ÿ”จ] -rw-r--r-- 1 cjia users 807 Feb 25 2020 .profile [๐Ÿณ|๐Ÿ”จ] drwxrwxr-x 2 root root 60 Mar 26 12:41 .ssh [๐Ÿณ|๐Ÿ”จ] /home/cjia [๐Ÿณ|๐Ÿ”จ] /home/cjia When logging in for the first time
ร—
ร—
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines