issue207:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue207:c_c [2024/07/27 10:20] – créée auntiee | issue207:c_c [2024/07/29 15:56] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | This weekend I had a chat with someone who had issues with his media box. Specifically, | + | **This weekend I had a chat with someone who had issues with his media box. Specifically, |
- | Let me give you the run-down. If, and this is a big IF, I remember correctly, it was part of LPIC-2. First thing you have to remember is that SAMBA uses port 445. In the old days, it ran on port 139, because of NETBIOS. I would suggest that any student who wishes to pass any IT exam, learn the basic ports by heart. You can use Anki – it works great on Ubuntu to make yourself some flashcards. If you are too lazy to do it, you don’t want the certification badly enough. SAMBA runs over TCP/IP, so no fire and forget. The other thing you must get an understanding of is the OSI model. SAMBA runs at the Application layer. SAMBA is a sort of unifying project, aiming to let Windows and Linux talk to each other. Server and workstation. | + | Let me give you the run-down. If, and this is a big IF, I remember correctly, it was part of LPIC-2. First thing you have to remember is that SAMBA uses port 445. In the old days, it ran on port 139, because of NETBIOS. I would suggest that any student who wishes to pass any IT exam, learn the basic ports by heart. You can use Anki – it works great on Ubuntu to make yourself some flashcards. If you are too lazy to do it, you don’t want the certification badly enough. SAMBA runs over TCP/IP, so no fire and forget. The other thing you must get an understanding of is the OSI model. SAMBA runs at the Application layer. SAMBA is a sort of unifying project, aiming to let Windows and Linux talk to each other. Server and workstation. |
- | OK, now you take a piece of paper and pull out four facts from that paragraph. | + | Ce week-end, j'ai discuté avec quelqu' |
+ | |||
+ | Laissez-moi vous expliquer. Si, et c'est un grand SI, je me souviens correctement, | ||
+ | |||
+ | |||
+ | **OK, now you take a piece of paper and pull out four facts from that paragraph. | ||
What you also need to understand is that SAMBA is not only for file sharing, you can share printers with SAMBA as well. Why? Let’s go one step down and look at SMB (Server Message Blocks). The SMB protocol (“protocol” here is important) requires a response. It will send a request and will wait for a response. Now when we have Windows in the mix, be it workstation or server, you need to read up on CIFS. (Common Internet File Service). A way to remember that the “C” in CIFS stands for common, is to remember that it needs a common way to talk to Linux. Not common as in found everywhere, but common as in shared. One thing to be aware of, if you are using older stuff at home, is that IPV6 should rather be avoided. For work and for the exam, however, know that IPV6 is supported, but only on port 445, here’s that number again. Now CIFS on IPV6 requires the IBM Data Ontap Library v 7.3.x (in other words, 1-onwards) to work. (https:// | What you also need to understand is that SAMBA is not only for file sharing, you can share printers with SAMBA as well. Why? Let’s go one step down and look at SMB (Server Message Blocks). The SMB protocol (“protocol” here is important) requires a response. It will send a request and will wait for a response. Now when we have Windows in the mix, be it workstation or server, you need to read up on CIFS. (Common Internet File Service). A way to remember that the “C” in CIFS stands for common, is to remember that it needs a common way to talk to Linux. Not common as in found everywhere, but common as in shared. One thing to be aware of, if you are using older stuff at home, is that IPV6 should rather be avoided. For work and for the exam, however, know that IPV6 is supported, but only on port 445, here’s that number again. Now CIFS on IPV6 requires the IBM Data Ontap Library v 7.3.x (in other words, 1-onwards) to work. (https:// | ||
- | TIP: Just remember that NETBIOS does not support IPV6. | + | TIP: Just remember that NETBIOS does not support IPV6.** |
+ | |||
+ | OK, maintenant vous prenez une feuille de papier et vous tirez quatre faits du paragraphe précédent. | ||
+ | |||
+ | Ce que vous devez également comprendre, c'est que SAMBA ne sert pas seulement à partager des fichiers, mais aussi des imprimantes. Pourquoi ? Allons un peu plus loin et examinons le SMB (Server Message Blocks). Le protocole SMB (« protocole » est ici important) exige une réponse. Il envoie une demande et attend une réponse. Lorsque Windows est impliqué, qu'il s' | ||
+ | |||
+ | CONSEIL : N' | ||
- | Here is your reading for this section: https:// | + | **Here is your reading for this section: https:// |
TIP: If you use SAMBA for LDAP, the port you need to pay attention to is port 389, it is easy to remember, as the RDP port is 3389. | TIP: If you use SAMBA for LDAP, the port you need to pay attention to is port 389, it is easy to remember, as the RDP port is 3389. | ||
Ligne 30: | Ligne 42: | ||
and once done: | and once done: | ||
+ | |||
+ | whereis samba** | ||
+ | |||
+ | Voici votre lecture pour cette section : https:// | ||
+ | |||
+ | ASTUCE : Si vous utilisez SAMBA pour LDAP, le port auquel vous devez prêter attention est le port 389. Il est facile à retenir, car le port RDP est 3389. | ||
+ | |||
+ | Parlons rapidement de la configuration de SAMBA. Je vais diviser cela en une section Linux et une section Windows. Puisque nous sommes des Linuxiens, parlons d' | ||
+ | |||
+ | Voici la partie pratique. (Quoi, vous ne pensiez pas quand même que vous pouviez faire cela seulement dans votre tête ?) Lancez Virtualbox et installez Ubuntu server. https:// | ||
+ | |||
+ | Je vous suggère également de vous procurer l' | ||
+ | |||
+ | Il est évident que vous allez entrer votre propre mot de passe sur l' | ||
+ | |||
+ | Vous ferez la même chose avec la configuration, | ||
+ | |||
+ | Une fois l' | ||
+ | |||
+ | Votre première tâche sera la suivante : | ||
+ | |||
+ | sudo apt install samba | ||
+ | |||
+ | et une fois que c'est fait : | ||
whereis samba | whereis samba | ||
- | If you already have a server set up that you can use, you can check if the daemons are running: | + | |
+ | **If you already have a server set up that you can use, you can check if the daemons are running: | ||
systemctl status smbd | systemctl status smbd | ||
Ligne 55: | Ligne 92: | ||
browsable = yes | browsable = yes | ||
- | One, two, three, spaces, it does not matter, the indentation here is not white space sensitive. | + | One, two, three, spaces, it does not matter, the indentation here is not white space sensitive.** |
- | As always, after any reconfiguration, | + | Si vous avez déjà un serveur configuré que vous pouvez utiliser, vous pouvez vérifier si les démons sont en cours d' |
+ | |||
+ | systemctl status smbd | ||
+ | |||
+ | systemctl status nmbd | ||
+ | |||
+ | Je vais me contenter de suivre le processus pour le mener à bien : https:// | ||
+ | |||
+ | Lorsque nous ferons la configuration, | ||
+ | |||
+ | mkdir / | ||
+ | |||
+ | sudo nano / | ||
+ | |||
+ | à la fin du fichier, ajoutez : | ||
+ | |||
+ | [sambashare] | ||
+ | comment = Samba sur Ubuntu | ||
+ | path = / | ||
+ | read only = no | ||
+ | browsable = yes | ||
+ | |||
+ | Un, deux, trois espaces, peu importe, l' | ||
+ | |||
+ | |||
+ | **As always, after any reconfiguration, | ||
sudo service smbd restart | sudo service smbd restart | ||
Ligne 81: | Ligne 143: | ||
Just like that, we have our base that we will be working from. Join us in the next issue for adding a samba user and explaining a bit more, to paint out the picture. | Just like that, we have our base that we will be working from. Join us in the next issue for adding a samba user and explaining a bit more, to paint out the picture. | ||
- | If I explained anything badly, misc@fullcirclemagazine.org | + | If I explained anything badly, misc@fullcirclemagazine.org** |
+ | |||
+ | Comme toujours, après toute reconfiguration, | ||
+ | |||
+ | sudo service smbd restart | ||
+ | |||
+ | ou vous pouvez utiliser : | ||
+ | |||
+ | systemctl restart smbd | ||
+ | |||
+ | Si vous utilisez UFW, vous devez autoriser SAMBA à passer : | ||
+ | |||
+ | sudo ufw allow samba | ||
+ | |||
+ | Rien d' | ||
+ | |||
+ | Le problème est que « read only = no » est équivalent à « writeable = yes ». | ||
+ | |||
+ | Maintenant, si vous êtes comme moi et que vous avez tendance à taper la mauvaise chose, tapez : testparm | ||
+ | |||
+ | Il vérifiera si votre fichier de configuration contient des erreurs. | ||
+ | |||
+ | Ce que vous recherchez, c'est « Loaded services file OK » (le fichier de service a été chargé correctement). | ||
+ | |||
+ | C'est ainsi que nous avons notre base de travail. Rejoignez-nous dans le prochain numéro pour ajouter un utilisateur samba et donner un peu plus d' | ||
+ | |||
+ | Si j'ai mal expliqué quelque chose, misc@fullcirclemagazine.org | ||
issue207/c_c.1722068407.txt.gz · Dernière modification : 2024/07/27 10:20 de auntiee