• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Installation stops during setting up fogproject password

Scheduled Pinned Locked Moved Solved
FOG Problems
6
39
7.6k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    Deimos @Tom Elliott
    last edited by Deimos Oct 21, 2019, 5:35 AM Oct 21, 2019, 11:34 AM

    @Tom-Elliott said in Installation stops during setting up fogproject password:

    cat /dev/urandom | tr -dc ‘0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~’ | head -c ${1:-12}

    [root@fog-ls15nb ~]# cat /dev/urandom | tr -dc '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' | head -c ${1:-12}
    (02;(D~#ZFBHtr: Schreibfehler: Broken pipe
    tr: Schreibfehler
    cat: Schreibfehler: Broken pipe
    [root@fog-ls15nb ~]#
    

    Just a note: Thanks for the help so far and for your patience.

    T 1 Reply Last reply Oct 21, 2019, 11:37 AM Reply Quote 0
    • T
      Tom Elliott @Deimos
      last edited by Oct 21, 2019, 11:37 AM

      @Deimos said in Installation stops during setting up fogproject password:
      How about:

      tr -dc '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' < /dev/urandom | head -c ${1:-12}

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • T
        Tom Elliott
        last edited by Oct 21, 2019, 11:47 AM

        Another option that doesn’t seem to loop forever:

        head /dev/urandom | tr -dc '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' | fold -w12 | shuf -n1
        

        What this one does, it breaks at the first new line urandom gives (so much faster return and not infinite loop), pipes that output to tr, folds it to a width of 12 characters, and shuffles the data returned from the fold.

        Hopefully this may help?

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 1
        • D
          Deimos
          last edited by Oct 21, 2019, 12:28 PM

          @Tom-Elliott said in Installation stops during setting up fogproject password:

          tr -dc ‘0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~’ < /dev/urandom | head -c ${1:-12}

          [root@fog-ls15nb ~]# tr -dc '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' < /dev/urandom | head -c ${1:-12}
          2>}?w0vfI8o]tr: Schreibfehler: Broken pipe
          tr: Schreibfehler
          [root@fog-ls15nb ~]# 
          

          Think this works:

          [root@fog-ls15nb ~]# head /dev/urandom | tr -dc '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' | fold -w12 | shuf -n1
          !F!lOldRC)r6
          [root@fog-ls15nb ~]# 
          

          But where can I add/replace this to the installation-script?

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Oct 21, 2019, 3:31 PM

            @Deimos said in Installation stops during setting up fogproject password:

            But where can I add/replace this to the installation-script?

            Take a look here: https://github.com/FOGProject/fogproject/blob/master/lib/common/functions.sh#L1261

            You find that file in fogproject/lib/common/functions.sh on your system…

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 1
            • D
              Deimos
              last edited by Oct 21, 2019, 3:34 PM

              Thanks, I will try this tomorrow.

              1 Reply Last reply Reply Quote 0
              • W
                Wayne Workman
                last edited by Oct 22, 2019, 2:24 AM

                it seems generating passwords in fog has been an issue for a while… be it special characters that need handled or double vs single quotes to contain it…

                Lately in my own projects, I opt for very long passwords made from upper & lower case letters and numbers randomly. I’m talking 32, or 64 characters long. Typically I look up the maximum length supported password, and generate one of that length, just letters and numbers.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                D 1 Reply Last reply Oct 22, 2019, 12:57 PM Reply Quote 0
                • D
                  Deimos
                  last edited by Deimos Oct 21, 2019, 11:29 PM Oct 22, 2019, 5:26 AM

                  Works. Well done, everybody.

                  do
                          [[ -z $password || $ret -ne 999 ]] && password=$(head /dev/urandom | tr -cd '0-9a-zA-Z' | fold -w12 | shuf -n1)
                          echo -e "$password\n$password" | passwd $username >>$workingdir/error_logs/fog_error_${version}.log 2>&1
                          ret=$?
                          let cnt+=1
                      done
                  

                  Special thanks to @Sebastian-Roth for patience and to stay in touch.

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by Oct 22, 2019, 7:04 AM

                    @Wayne-Workman said in Installation stops during setting up fogproject password:

                    it seems generating passwords in fog has been an issue for a while… be it special characters that need handled or double vs single quotes to contain it…
                    Lately in my own projects, I opt for very long passwords made from upper & lower case letters and numbers randomly. I’m talking 32, or 64 characters long. Typically I look up the maximum length supported password, and generate one of that length, just letters and numbers.

                    Good point you have there. Early this year we started thinking about moving to better password policy in general. Not using an empty password for mysql, setting a random passphrase for the web UI login and such. As sort of a preperation I committed a change that moves away from the original openssl rand -base64 32 because I thought people wouldn’t even bother about trying to memorize a 32 length password (web UI login). But I got somehow sidetracked by too many other things and never finished what I initially thought about: Having different levels of complexity passwords instead of one fits all.

                    So we might discuss this now before we change things again.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    1 Reply Last reply Reply Quote 2
                    • D
                      Deimos @Wayne Workman
                      last edited by Oct 22, 2019, 12:57 PM

                      @Wayne-Workman said in Installation stops during setting up fogproject password:

                      own projects, I opt for very long passwords made from upper & lower case letters and numbers randomly. I’m talking 32, or 64 characters long. Typically I look up the maximum length supported password, and generate one of that length, just letters and numbers.

                      I tried another installation on an other, identical notebook fujitsu lifebook with fedora server 30, but allowed special characters in the function.sh and it works also.

                      do
                              [[ -z $password || $ret -ne 999 ]] && password=$(head /dev/urandom | '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' | fold -w12 | shuf -n1)
                              echo -e "$password\n$password" | passwd $username >>$workingdir/error_logs/fog_error_${version}.log 2>&1
                              ret=$?
                              let cnt+=1
                          done
                      
                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 2 / 2
                      2 / 2
                      • First post
                        39/39
                        Last post

                      136

                      Online

                      12.2k

                      Users

                      17.3k

                      Topics

                      155.5k

                      Posts
                      Copyright © 2012-2024 FOG Project