Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Änderungen iob CLI/Installer/Fixer mit Root Accounts

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • 15. 05. Wartungsarbeiten am ioBroker Forum

    • Monatsrückblick - April 2025

    Änderungen iob CLI/Installer/Fixer mit Root Accounts

    This topic has been deleted. Only users with topic management privileges can see it.
    • Thomas Braun
      Thomas Braun Most Active @Feuersturm last edited by Thomas Braun

      @feuersturm sagte in Änderungen iob CLI/Installer/Fixer mit Root Accounts:

      Hat es einen Grund, das das Skript nicht einfach auf die Eingabe wartet oder aktiv abgebrochen werden muss mit Strg+C?

      Kann ich nicht steuern, das kommt so vom polkit/pam.
      Allerdings könnte man die falsche Erfolgsmeldung Autostart enabled! anpassen.

      1 Reply Last reply Reply Quote 0
      • David G.
        David G. last edited by David G.

        Leider nur ein Screenshot, das c&p wollte irgendwie nicht...

        Screenshot_20241026_125833_RaspController.jpg

        Debian 12.

        Thomas Braun 1 Reply Last reply Reply Quote 0
        • Thomas Braun
          Thomas Braun Most Active @David G. last edited by

          @david-g

          Ja, ist bekannt. Fix ist 'in der Mache'.

          David G. 1 Reply Last reply Reply Quote 1
          • David G.
            David G. @Thomas Braun last edited by

            @thomas-braun

            Wird das Script das auch irgendwann selber lösen können?

            david@iobroker:~$ iob stop
            david@iobroker:~$ iob fix
            [sudo] Passwort für david:
            bash: /home/iobroker/.fix.sh: Keine Berechtigung
            david@iobroker:~$ sudo iob fix
            
            ***For security reasons ioBroker should not be run or administrated as root.***
            By default only a user that is member of iobroker group can execute ioBroker commands.
            Please read the Documentation on how to set up such a user, if not done yet.
            Only in very special cases you can run iobroker commands by adding the --allow-root option at the end of the command line.
            Please note that this option may be disabled in the future, so please change your setup accordingly now.
            david@iobroker:~$
            
            Thomas Braun 1 Reply Last reply Reply Quote 0
            • Thomas Braun
              Thomas Braun Most Active @David G. last edited by

              @david-g sagte in Änderungen iob CLI/Installer/Fixer mit Root Accounts:

              Wird das Script das auch irgendwann selber lösen können?

              Was genau?
              Schau dir die Rechte an

              ls -l /home/iobroker/
              ls -l /home/iobroker/.fix.sh
              

              Vermutlich ist david nicht in der Gruppe 'iobroker' enthalten.

              groups
              

              zeigt die.

              David G. 1 Reply Last reply Reply Quote 0
              • David G.
                David G. @Thomas Braun last edited by

                @thomas-braun

                Dass ein User automatisch der erforderlichen Gruppe hinzugefügt werden kann.

                Ggf hat man ja schon einen User den man verwenden möchte anstatt einen neuen anzulegen.

                david@iobroker:~$ sudo ls -l /home/iobroker/
                [sudo] Passwort für david:
                insgesamt 24
                -rw-r--r-- 1 iobroker iobroker   122 21. Okt 22:17 iob_diag.log
                -rwxr--r-- 1 iobroker iobroker 15796 29. Sep 2023  iob_node_update
                drwxr-xr-x 5 iobroker iobroker  4096 31. Mär 2024  skripte
                david@iobroker:~$ sudo ls -l /home/iobroker/.fix.sh
                -rw-r--r-- 1 iobroker iobroker 45390 26. Okt 13:04 /home/iobroker/.fix.sh
                david@iobroker:~$ groups
                david sudo users
                david@iobroker:~$
                
                Thomas Braun 1 Reply Last reply Reply Quote 0
                • Thomas Braun
                  Thomas Braun Most Active @David G. last edited by Thomas Braun

                  @david-g sagte in Änderungen iob CLI/Installer/Fixer mit Root Accounts:

                  Dass ein User automatisch der erforderlichen Gruppe hinzugefügt werden kann.

                  Nee, das muss der sys admin selber für bestehende user machen.
                  Sonst könnte ja ein user, der es gar nicht in die Gruppe reingehört einfach das Skript aufrufen und sich dann so hinzufügen.

                  sudo usermod -a -G iobroker david
                  

                  Den david dann einmal ausloggen und wieder einloggen.

                  1 Reply Last reply Reply Quote 0
                  • David G.
                    David G. last edited by

                    @thomas-braun

                    Kann aber gerne einen Thread auf machen.
                    Ist ja eher sehr offtopic....
                    Zumindest wenn der fixer es technisch nicht übernehmen kann.

                    david@iobroker:~$ groups david
                    david : david sudo users iobroker
                    david@iobroker:~$ iob stop
                    david@iobroker:~$ iob fix
                    [sudo] Passwort für david:
                    bash: /home/iobroker/.fix.sh: Keine Berechtigung
                    david@iobroker:~$ sudo iob fix
                    
                    ***For security reasons ioBroker should not be run or administrated as root.***
                    By default only a user that is member of iobroker group can execute ioBroker commands.
                    Please read the Documentation on how to set up such a user, if not done yet.
                    Only in very special cases you can run iobroker commands by adding the --allow-root option at the end of the command line.
                    Please note that this option may be disabled in the future, so please change your setup accordingly now.
                    david@iobroker:~$
                    
                    Thomas Braun 1 Reply Last reply Reply Quote 0
                    • Thomas Braun
                      Thomas Braun Most Active @David G. last edited by

                      @david-g

                      david wurde ausgeloggt?

                      ls -l /home
                      

                      sagt?

                      David G. 1 Reply Last reply Reply Quote 0
                      • David G.
                        David G. @Thomas Braun last edited by David G.

                        @thomas-braun

                        Ja, auch einmal als anderen User angemeldet.

                        david@iobroker:~$ ls -l /home
                        insgesamt 8
                        drwx------ 4 david    david    4096 26. Okt 13:36 david
                        drwx------ 9 iobroker iobroker 4096 26. Okt 12:54 iobroker
                        david@iobroker:~$
                        
                        Thomas Braun 1 Reply Last reply Reply Quote 0
                        • Thomas Braun
                          Thomas Braun Most Active @David G. last edited by Thomas Braun

                          @david-g sagte in Änderungen iob CLI/Installer/Fixer mit Root Accounts:

                          drwx------ 9 iobroker iobroker 4096 26. Okt 12:54 iobroker

                          Da fehlen die Gruppen-Rechte.

                          sudo chmod 750 /home/iobroker
                          

                          Ist das heute frisch angelegt worden?

                          David G. 1 Reply Last reply Reply Quote 0
                          • David G.
                            David G. @Thomas Braun last edited by David G.

                            @thomas-braun

                            Das war es.

                            Warum findet er ein graphical target?

                            david@iobroker:~$ systemctl status display-manager
                            Unit display-manager.service could not be found.
                            david@iobroker:~$ iob fix
                            [sudo] Passwort für david:
                            
                            Your system is booting into 'graphical.target', which means that a user interface or desktop is available. Usually a server is running without a desktop to have more RAM available. Do you want to switch to 'multi-user.target'? (y/N)
                            

                            Hab recht sicher ohne gui installiert.

                            Thomas Braun 1 Reply Last reply Reply Quote 0
                            • Thomas Braun
                              Thomas Braun Most Active @David G. last edited by Thomas Braun

                              @david-g sagte in Änderungen iob CLI/Installer/Fixer mit Root Accounts:

                              Warum findet er ein graphical target?

                              Weil dein System so eingestellt ist.

                              Hab recht sicher ohne gui installiert.

                              Das heißt aber nicht, das auch das richtige boot target eingestellt ist.

                              ESP8266 1 Reply Last reply Reply Quote 0
                              • ESP8266
                                ESP8266 @Thomas Braun last edited by

                                @thomas-braun , zur Info, fixer und diag laufen sauber durch.
                                War eh noch nie mit root unterwegs.

                                1 Reply Last reply Reply Quote 0
                                • D
                                  darkblu last edited by darkblu

                                  das hier kommt neuerdings nach dem:

                                  iob fix
                                  
                                  ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
                                  Authentication is required to stop 'iobroker.service'.
                                  Authenticating as: ,,, (name)
                                  Password:
                                  ==== AUTHENTICATION COMPLETE ====
                                  

                                  gehört das dahin, oder läuft bei mir was schief ?
                                  Nach Passworteingabe gehts normal weiter mit:

                                  Enabling autostart...
                                  Autostart enabled!
                                  
                                  Thomas Braun David G. 2 Replies Last reply Reply Quote 0
                                  • Thomas Braun
                                    Thomas Braun Most Active @darkblu last edited by

                                    @darkblu sagte in Änderungen iob CLI/Installer/Fixer mit Root Accounts:

                                    gehört das dahin, oder läuft bei mir was schief ?

                                    Das muss so.

                                    1 Reply Last reply Reply Quote 1
                                    • David G.
                                      David G. @darkblu last edited by

                                      @darkblu

                                      Fand ich beim ersten mal auch verwirrend, auch mit der Userauswahl.

                                      Thomas Braun 1 Reply Last reply Reply Quote 0
                                      • Thomas Braun
                                        Thomas Braun Most Active @David G. last edited by

                                        @david-g sagte in Änderungen iob CLI/Installer/Fixer mit Root Accounts:

                                        auch mit der Userauswahl.

                                        Welche Userauswahl?
                                        Da steht das user drin, der das Skript ausführt. Und der sich an der Stelle legitimieren muss, das er an systemd-Services herumfingern darf.

                                        David G. 1 Reply Last reply Reply Quote 0
                                        • David G.
                                          David G. @Thomas Braun last edited by David G.

                                          @thomas-braun

                                          Ich konnte mit 1 oder 2 den User david oder iobroker auswählen.
                                          Schaue gleich mal ob ich es reproduziert bekomme.

                                          EDIT

                                          Last login: Mon Oct 28 18:30:18 2024 from 192.168.99.143
                                          david@iobroker:~$ iob fix
                                          [sudo] Passwort für david:
                                          library: loaded
                                          Library version=2024-10-22
                                          
                                          ==========================================================================
                                          
                                              Welcome to the ioBroker installation fixer!
                                              Script version: 2024-10-22
                                          
                                              You might need to enter your password a couple of times.
                                          
                                          ==========================================================================
                                          
                                          
                                          ==========================================================================
                                              Installing prerequisites (1/5)
                                          ==========================================================================
                                          
                                          OK:1 http://security.debian.org/debian-security bookworm-security InReleaseOK:2 http://deb.debian.org/debian bookworm InRelease
                                          OK:3 http://deb.debian.org/debian bookworm-updates InRelease
                                          OK:4 https://deb.nodesource.com/node_20.x nodistro InRelease
                                          OK:5 https://packagecloud.io/ookla/speedtest-cli/debian bookworm InRelease
                                          Paketlisten werden gelesen… Fertig
                                          
                                          ==========================================================================
                                              Checking ioBroker user and directory permissions (2/5)
                                          ==========================================================================
                                          
                                          Created /etc/sudoers.d/iobroker
                                          Fixing directory permissions...
                                          
                                          ==========================================================================
                                              Check and cleanup npm temporary directories (3/5)
                                          ==========================================================================
                                          
                                          Done.
                                          
                                          ==========================================================================
                                              Database maintenance (4/5)
                                          ==========================================================================
                                          
                                          Checking for uncompressed JSONL databases... This might take a while!
                                          
                                          Compressing /opt/iobroker/iobroker-data/states.jsonl
                                          Compressing /opt/iobroker/iobroker-data/objects.jsonl
                                          Compressed 2 JSONL files. Done
                                          
                                          ==========================================================================
                                              Checking autostart (5/5)
                                          ==========================================================================
                                          
                                          ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
                                          Legitimierung ist zum Stoppen von »iobroker.service« notwendig.
                                          Multiple identities can be used for authentication:
                                           1.  iobroker,,, (iobroker)
                                           2.  ,,, (david)
                                          Choose identity to authenticate as (1-2):
                                          
                                          Thomas Braun 1 Reply Last reply Reply Quote 0
                                          • Thomas Braun
                                            Thomas Braun Most Active @David G. last edited by

                                            @david-g
                                            Ja, das ist möglich. Dürfte aber nur der Fall sein, wenn der user 'iobroker' nicht als systemuser angelegt ist.

                                            David G. 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            998
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            25
                                            202
                                            18248
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo