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

langage de programmation

Scheduled Pinned Locked Moved General
51 Posts 3 Posters 19.9k Views
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.
  • J
    julio @george1421
    last edited by Feb 3, 2021, 9:59 AM

    @george1421
    j’ai reussi à entrer dans la partition de debogage. j’ai executer la commande lsblk. voici ce que j’obtient.partitionparclone.PNG

    G 1 Reply Last reply Feb 3, 2021, 10:58 AM Reply Quote 0
    • J
      julio @george1421
      last edited by Feb 3, 2021, 10:40 AM

      @george1421 salut george. j’ai eu une erreur qui s’affiche on me precise syntax error. donc le script essaye de s’executer mais petite erreur. voici l’image en questionerreur.PNG

      1 Reply Last reply Reply Quote 0
      • J
        julio @Sebastian Roth
        last edited by Feb 3, 2021, 10:57 AM

        @sebastian-roth oui roth j’ai vu ou il y’a erreur: c’est au niveau de la ligne5 dans mon code: ici

        if [[“$osid”==“50”]]; then ça me dire sysntax error. juste pour vous donner un indice.

        1 Reply Last reply Reply Quote 0
        • G
          george1421 Moderator @julio
          last edited by Feb 3, 2021, 10:58 AM

          @julio said in langage de programmation:

          ’ai reussi à entrer dans la partition de debogage. j’ai executer la commande lsblk. voici ce que j’obtient

          Ok I see only one partition then /dev/sda1. Now you know what your target partition is.

          donc le script essaye de s’executer mais petite erreur.

          Here is an example of my if/then

                  if [[ -z $hd ]]; then
                      handleError "Could not find hdd to use"
                  fi
          

          When you look at your if / then statement do you see any differences? How about spacing?

          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!

          J 1 Reply Last reply Feb 3, 2021, 11:15 AM Reply Quote 0
          • J
            julio @george1421
            last edited by Feb 3, 2021, 11:15 AM

            @george1421 voici mon script finalmon scriptfinal.PNG

            G 2 Replies Last reply Feb 3, 2021, 11:22 AM Reply Quote 0
            • G
              george1421 Moderator @julio
              last edited by Feb 3, 2021, 11:22 AM

              @julio You MUST look at the if statement. It is wrong.

              if[[ $osid == 50 ]];then
              

              Should be rewritten as

              if [[ $osid == "50" ]]; then
              

              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!

              1 Reply Last reply Reply Quote 0
              • G
                george1421 Moderator @julio
                last edited by Feb 3, 2021, 11:25 AM

                @julio I also see you are missing fi

                if [[ $osid == "50" ]]; then
                    echo "Hello Mom"
                fi
                

                Is the syntax

                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!

                J 1 Reply Last reply Feb 3, 2021, 1:37 PM Reply Quote 0
                • J
                  julio @george1421
                  last edited by Feb 3, 2021, 1:37 PM

                  @george1421 désolé j’ai toujours la meme erreur. je sais pas si je doit changer totalement la ligne 5.script1.PNG en passant j’ai bien
                  fi à la fin de mon script.

                  G 1 Reply Last reply Feb 3, 2021, 2:10 PM Reply Quote 0
                  • G
                    george1421 Moderator @julio
                    last edited by george1421 Feb 3, 2021, 8:11 AM Feb 3, 2021, 2:10 PM

                    @julio Your program is still wrong. I will type short items because I am tired.

                    #!/bin/bash
                    echo "hello"
                    read
                    
                    if [[ $osid == "50" ]]; then
                      echo "ok"
                    
                      mdkir -p /ext
                    
                      mount /dev/sda1 /ext
                    
                      echo $hostname > /ext/etc/hostname
                    
                      unmount /ext
                    fi
                    
                    1. Your if command needs a space after if and the first square bracket
                    2. You need fi at the end to show the closing of the if statement.

                    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!

                    J 2 Replies Last reply Feb 3, 2021, 4:32 PM Reply Quote 0
                    • J
                      julio @george1421
                      last edited by Feb 3, 2021, 4:32 PM

                      @george1421 salut george. vraiment merci beaucoup pour tout ça fonctionne bien maintenant

                      1 Reply Last reply Reply Quote 0
                      • J
                        julio @george1421
                        last edited by Feb 3, 2021, 5:31 PM

                        @george1421 je tenais à te remercier une fois de plus. thank you again. je te dois une fiere chandel. pour ceux qui en ont besion voici le script final en question.scriptfonctionnel.PNG

                        1 Reply Last reply Reply Quote 1
                        • J
                          julio
                          last edited by Feb 15, 2021, 8:18 AM

                          bonjour george. j’ai un dernier point sur lequel je sollicite ton aide. je veux faire un script pour joindre un domaine active directory avec des machines linux. à tu une idée de comment je pourrais me prendre avec ça. merci bien

                          G 1 Reply Last reply Feb 15, 2021, 11:01 AM Reply Quote 0
                          • G
                            george1421 Moderator @julio
                            last edited by Feb 15, 2021, 11:01 AM

                            @julio Single command realm https://www.redhat.com/sysadmin/linux-active-directory

                            https://4sysops.com/archives/join-a-debian-linux-server-to-an-active-directory-domain/

                            once command once the installed packages are available.

                            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!

                            J 1 Reply Last reply Mar 5, 2021, 10:45 AM Reply Quote 0
                            • J
                              julio @george1421
                              last edited by Mar 5, 2021, 10:45 AM

                              @george1421 said in langage de programmation:

                              @julio Single command realm https://www.redhat.com/sysadmin/linux-active-directory

                              https://4sysops.com/archives/join-a-debian-linux-server-to-an-active-directory-domain/

                              once command once the installed packages are available.

                              Bonjour george: désolé d’être absent depuis ces dernières temps. je redigiais mon rapport sur tout ce que j’ai déja fais.

                              j’ai suivie les tutos que tu m’as envoyé mais je n’arrive pas à joindre le domaine active directory avec la distribution linux ubuntu 18.04 j’ai installer tous les paquets donc j’avais besion mais cela ne fonctionne pas. y’a t 'il un fichier spécifique que je pourrais configurer pour fais fonctionné la jointure au domaine???

                              1 Reply Last reply Reply Quote 0
                              • J
                                julio
                                last edited by Mar 5, 2021, 10:48 AM

                                domaineAD.PNG

                                bonjour george voici une erreur de ce que j’ai rencontrer comme problème.

                                G 1 Reply Last reply Mar 5, 2021, 12:37 PM Reply Quote 0
                                • G
                                  george1421 Moderator @julio
                                  last edited by Mar 5, 2021, 12:37 PM

                                  @julio On your target computer where you want to run the realm command. Ping lheh.be does the response come from on of your domain controllers?

                                  Also for your domain you use the Administrator account or should another account be used that has rights to add computers to the domain?

                                  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!

                                  J 2 Replies Last reply Mar 9, 2021, 12:31 PM Reply Quote 0
                                  • J
                                    julio @george1421
                                    last edited by Mar 9, 2021, 12:31 PM

                                    @george1421 bonjour george, mon domaine c’est bien lheh.be et le nom de mon serveur est srvldap.lheh.be je ping bien srvldap.lheh.be et dans mon active directory j’ai créer une OU dans laquelle mes utilisateurs s’y trouve. et comment je pourrais fais en sorte que ma machine rejoint le domaine directement. quelle fichier je pourrais configuré pour cela.

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      julio @george1421
                                      last edited by Mar 14, 2021, 12:10 PM

                                      @george1421 Bonjour george, oui mon domaine est bien et belle lheh.be et je ping bien mon domaine lheh.be et le nom de mon serveur windows 2016 est srvldap.lheh.be mais quand j’essaye de joindre le domaine avec la commande realm ça ne fonctionne pas. as tu une idée à me proposé???

                                      G 1 Reply Last reply Mar 14, 2021, 3:44 PM Reply Quote 0
                                      • G
                                        george1421 Moderator @julio
                                        last edited by Mar 14, 2021, 3:44 PM

                                        @julio Good that means that dns is working like it should.

                                        Two things I can think of

                                        1. Is the ubuntu firewall getting in your way?
                                        2. Did you follow the step by step provided in the previous post? https://4sysops.com/archives/join-a-debian-linux-server-to-an-active-directory-domain/

                                        ??

                                        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!

                                        J 1 Reply Last reply Mar 15, 2021, 9:01 AM Reply Quote 0
                                        • J
                                          julio @george1421
                                          last edited by Mar 15, 2021, 9:01 AM

                                          @george1421 oui j’ai suivi tous les étapes mentionnées sur le lien que tu m’as envoyé mais cela n’a pas toujours fonctionné. je ne sais pas si c’est le parefeu sur linux ou windows qui dérange mais sur linux je ne pense pas parce que j’ai des port spécifique que je suis censer ouvrir mais sur windows je sais pas trop ce que je dois faire???

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 2 / 3
                                          • First post
                                            Last post

                                          160

                                          Online

                                          12.4k

                                          Users

                                          17.4k

                                          Topics

                                          155.9k

                                          Posts
                                          Copyright © 2012-2025 FOG Project