Même article que celui du blog interne de l’entreprise…
cmd > ssh root@172.20.0.xxx (Brawndo)
Version actuelle de samba ? >>>>> Le probleme principal = on est en DEBIAN 7 ! <<<<<<<< avec apt-get install samba … On reinstalle Samba 3 !
root@brawndo:/etc# dpkg -l ‘samba*’
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom Version Architecture Description
+++-==========================-==================-==================-=========================================================
ii samba 2:3.6.6-6+deb7u16 amd64 SMB/CIFS file, print, and login server for Unix
ii samba-common 2:3.6.6-6+deb7u16 all common files used by both the Samba server and client
ii samba-common-bin 2:3.6.6-6+deb7u16 amd64 common files used by both the Samba server and client
ii samba-doc 2:3.6.6-6+deb7u7 all Samba documentation
un samba-doc-pdf (aucune description n’est disponible)
un samba-tools (aucune description n’est disponible)
un samba4 (aucune description n’est disponible)
un samba4-common (aucune description n’est disponible)
root@brawndo:/etc#
1) Stop all Samba services.
service samba status
service samba stop
2) Create a backup
mkdir /home/lionel/etc-samba-archive-3.6.6
cp -Ruvp /etc/samba/* /home/lionel/etc-samba-archive-3.6.6
3) Read the release notes of skipped versions. They contain important information, such as new features, changed parameter, and bug fixes. In case you switch to new major release, read the release notes of the initial version (x.y.0) and the ones from minor versions up to the new version you will update to. For example, if you update from 4.4.4 to 4.6.2, read the 4.5.0, 4.6.0, 4.6.1, and 4.6.2 release notes.
Install the latest version over your existing one:
If you compile Samba from the sources, use the same configure options as used for your previous version. For more information, see Build Samba From the Sources.
If you update using packages, read the distribution documentation for information how to update.
If you update Samba by compiling from the sources, you should be aware that code can be removed for various reasons. If code is removed and you compile and install Samba over your existing Samba installation, this can lead to old libs being left on disk, this can lead to errors. For this reason, it is recommended that you replace the entire Samba installation if you compile Samba from sources. This should not affect Samba when updating by using distro packages.
—- Désinstaller Samba :
385 apt-get remove –purge samba*
386 apt-get -y autoremove
387 apt-get -y autoclean
388 apt-get -y clean
—- Installer Samba :
404 apt-get install samba
405 apt-get install -f
—- Restaurer fichiers de config :
411 cp -Ruvp /home/lionel/etc-samba-archive-3.6.6/* /etc/samba/
—- Start Samba.
413 service samba reload
414 service samba restart
415 service samba status
Start the same daemons as on your previous version:
On Samba AD DCs: samba
On Samba NT4-style PDC/BDCs: smbd, nmbd
On Samba domain members: smbd, nmbd winbind
On Samba standalone hosts: smbd
—- Check your Samba log files for errors :
499 cd /var/log/samba/
501 ls -alFtr
502 more log.smbd
—— RECREER tous les USERS SAMBA avec la cmd : « smbpasswd -a »
515 smbpasswd -a lionel
516 smbpasswd -a sena
517 smbpasswd -a nicolas
518 smbpasswd -a jack
524 smbpasswd -a mick
525 smbpasswd -a fredo
526 smbpasswd -a nathalie
527 smbpasswd -a david
528 smbpasswd -a anatole
529 smbpasswd -a dominique
- smbpasswd -a scanman : Ath… (pour permettre l’enreg des fichiers scannés sur le réseau)
————————————– Relancer le batch « Lecteurs-reseaux-HITEC.cmd »
————————————– Vérifier Users et Partages avec « smbstatus »
root@brawndo:/etc/samba# smbstatus
Samba version 3.6.6
PID Username Group Machine
3191 lionel lionel pc-pjm (172.20.0.xx)
3196 sena sena asus-sena (172.20.0.xx)
3190 lionel lionel pc-pjm (172.20.0.xx)
3328 nicolas nicolas pc-nico (172.20.0.xx)
3199 jack jack pc-jack (172.20.0.xx)
Service pid machine Connected at
scanman 3199 pc-jack Mon Jul 5 16:16:57 2021
lionel 3190 pc-pjm Mon Jul 5 16:12:33 2021
backup 3191 pc-pjm Mon Jul 5 16:12:45 2021
bureautique 3196 asus-sena Mon Jul 5 16:14:33 2021
stock 3196 asus-sena Mon Jul 5 16:14:28 2021
stock 3190 pc-pjm Mon Jul 5 16:12:33 2021
compta 3190 pc-pjm Mon Jul 5 16:13:42 2021
bureautique 3190 pc-pjm Mon Jul 5 16:12:33 2021
stock 3199 pc-jack Mon Jul 5 16:16:57 2021
hitec 3190 pc-pjm Mon Jul 5 16:12:33 2021
sena 3196 asus-sena Mon Jul 5 16:14:35 2021
bureautique 3328 pc-nico Mon Jul 5 16:26:37 2021
compta 3199 pc-jack Mon Jul 5 16:16:57 2021
hitec 3196 asus-sena Mon Jul 5 16:14:34 2021
jack 3199 pc-jack Mon Jul 5 16:16:57 2021
scanman 3190 pc-pjm Mon Jul 5 16:12:33 2021
hitec 3199 pc-jack Mon Jul 5 16:16:57 2021
bureautique 3199 pc-jack Mon Jul 5 16:16:53 2021
compta 3196 asus-sena Mon Jul 5 16:14:32 2021
scanman 3196 asus-sena Mon Jul 5 16:14:29 2021
Locked files:
Pid Uid DenyMode Access R/W Oplock SharePath Name Time
3190 1014 DENY_NONE 0x81 RDONLY NONE /home/lionel . Mon Jul 5 16:22:09 2021
3190 1014 DENY_NONE 0x81 RDONLY NONE /home/lionel . Mon Jul 5 16:22:09 2021