Alberto Garcia

Configuració del client de correu electrònic (squirremail)

Configuració del client de correu electrònic (squirremail) Mentre estava mirant informació de la instal·lació, he vist que aquest programa està desactualitzat, i no funciona amb les noves versions de Debian com la que nosaltres fem servir, ja que és Debian 12, el problema és el PHP, ja que el que bé instal·lat és el 8.2, i l’últim PHP que funciona amb el squirrmail és el 7.4, llavors el primer que farem serà desactualitzat el PHP a l’última versió utilitzable, per després fer la instal·lació. Amb les següents comandes instal·larem les dependències que necessitem, el repositori de l’antic PHP per a després instal·lar-ho. # Actualizar sistema e instalar dependencias iniciales sudo apt update sudo apt install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg # Agregar la llave GPG y el repositorio de PHP sudo curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list # Instalar PHP 7.4 y módulos necesarios para SquirrelMail sudo apt update sudo apt install -y php7.4 php7.4-common php7.4-mysql php7.4-xml php7.4-mbstring php7.4-curl libapache2-mod-php7.4 Resultats comandes # Actualizar sistema e instalar dependencias iniciales vagrant@debian:~$ sudo apt update Hit:1 http://deb.debian.org/debian bookworm InRelease Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB] Get:3 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB] Get:4 http://security.debian.org/debian-security bookworm-security/main Sources [196 kB] Get:5 http://security.debian.org/debian-security bookworm-security/main amd64 Packages [291 kB] Fetched 590 kB in 0s (1677 kB/s) Reading package lists… Done Building dependency tree… Done Reading state information… Done 26 packages can be upgraded. Run 'apt list –upgradable' to see them. vagrant@debian:~$ sudo apt install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg Reading package lists… Done Building dependency tree… Done Reading state information… Done lsb-release is already the newest version (12.0-1). lsb-release set to manually installed. ca-certificates is already the newest version (20230311+deb12u1). The following additional packages will be installed: appstream dirmngr gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv libappstream4 libassuan0 libduktape207 libgirepository-1.0-1 libglib2.0-0 libglib2.0-bin libglib2.0-data libgstreamer1.0-0 libksba8 libnpth0 libpackagekit-glib2-18 libpolkit-agent-1-0 libpolkit-gobject-1-0 libxmlb2 libyaml-0-2 packagekit packagekit-tools pinentry-curses polkitd python3-blinker python3-cffi-backend python3-cryptography python3-dbus python3-distro python3-gi python3-jwt python3-lazr.restfulclient python3-lazr.uri python3-oauthlib python3-software-properties python3-wadllib sgml-base xml-core Suggested packages: apt-config-icons pinentry-gnome3 tor parcimonie xloadimage scdaemon low-memory-monitor gstreamer1.0-tools pinentry-doc polkitd-pkla python-blinker-doc python-cryptography-doc python3-cryptography-vectors python-dbus-doc python3-crypto sgml-base-doc debhelper The following NEW packages will be installed: appstream apt-transport-https dirmngr gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libappstream4 libassuan0 libduktape207 libgirepository-1.0-1 libglib2.0-bin libgstreamer1.0-0 libksba8 libnpth0 libpackagekit-glib2-18 libpolkit-agent-1-0 libpolkit-gobject-1-0 libxmlb2 libyaml-0-2 packagekit packagekit-tools pinentry-curses polkitd python3-blinker python3-cffi-backend python3-cryptography python3-dbus python3-distro python3-gi python3-jwt python3-lazr.restfulclient python3-lazr.uri python3-oauthlib python3-software-properties python3-wadllib sgml-base software-properties-common xml-core The following packages will be upgraded: gpgv libglib2.0-0 libglib2.0-data 3 upgraded, 46 newly installed, 0 to remove and 23 not upgraded. Need to get 16.0 MB of archives. After this operation, 36.9 MB of additional disk space will be used. Get:1 http://deb.debian.org/debian bookworm/main amd64 sgml-base all 1.31 [15.4 kB] Get:2 http://deb.debian.org/debian bookworm/main amd64 gpgv amd64 2.2.40-1.1+deb12u2 [649 kB] Get:3 http://deb.debian.org/debian bookworm/main amd64 libglib2.0-0 amd64 2.74.6-2+deb12u8 [1402 kB] Get:4 http://deb.debian.org/debian bookworm/main amd64 libxmlb2 amd64 0.3.10-2 [60.2 kB] Get:5 http://deb.debian.org/debian bookworm/main amd64 libyaml-0-2 amd64 0.2.5-1 [53.6 kB] Get:6 http://deb.debian.org/debian bookworm/main amd64 libappstream4 amd64 0.16.1-2 [199 kB] Get:7 http://deb.debian.org/debian bookworm/main amd64 appstream amd64 0.16.1-2 [407 kB] Get:8 http://deb.debian.org/debian bookworm/main amd64 apt-transport-https all 2.6.1 [25.2 kB] Get:9 http://deb.debian.org/debian bookworm/main amd64 libassuan0 amd64 2.5.5-5 [48.5 kB] Get:10 http://deb.debian.org/debian bookworm/main amd64 gpgconf amd64 2.2.40-1.1+deb12u2 [565 kB] Get:11 http://deb.debian.org/debian bookworm/main amd64 libksba8 amd64 1.6.3-2 [128 kB] Get:12 http://deb.debian.org/debian bookworm/main amd64 libnpth0 amd64 1.6-3 [19.0 kB] Get:13 http://deb.debian.org/debian bookworm/main amd64 dirmngr amd64 2.2.40-1.1+deb12u2 [793 kB] Get:14 http://deb.debian.org/debian bookworm/main amd64 libgirepository-1.0-1 amd64 1.74.0-3 [101 kB] Get:15 http://deb.debian.org/debian bookworm/main amd64 gir1.2-glib-2.0 amd64 1.74.0-3 [159 kB] Get:16 http://deb.debian.org/debian bookworm/main amd64 libpackagekit-glib2-18 amd64 1.2.6-5 [113 kB] Get:17 http://deb.debian.org/debian bookworm/main amd64 gir1.2-packagekitglib-1.0 amd64 1.2.6-5 [25.9 kB] Get:18 http://deb.debian.org/debian bookworm/main amd64 gnupg-l10n all 2.2.40-1.1+deb12u2 [1093 kB] Get:19 http://deb.debian.org/debian bookworm/main amd64 gnupg-utils amd64 2.2.40-1.1+deb12u2 [927 kB] Get:20 http://deb.debian.org/debian bookworm/main amd64 gpg amd64 2.2.40-1.1+deb12u2 [950 kB] Get:21 http://deb.debian.org/debian bookworm/main amd64 pinentry-curses amd64 1.2.1-1 [77.4 kB] Get:22 http://deb.debian.org/debian bookworm/main amd64 gpg-agent amd64 2.2.40-1.1+deb12u2 [695 kB] Get:23 http://deb.debian.org/debian bookworm/main amd64 gpg-wks-client amd64 2.2.40-1.1+deb12u2 [541 kB] Get:24 http://deb.debian.org/debian bookworm/main amd64 gpg-wks-server amd64 2.2.40-1.1+deb12u2 [531 kB] Get:25 http://deb.debian.org/debian bookworm/main amd64 gpgsm amd64 2.2.40-1.1+deb12u2 [671 kB] Get:26 http://deb.debian.org/debian bookworm/main amd64 gnupg all 2.2.40-1.1+deb12u2 [846 kB] Get:27 http://deb.debian.org/debian bookworm/main amd64 libduktape207 amd64 2.7.0-2 [134 kB] Get:28 http://deb.debian.org/debian bookworm/main amd64 libglib2.0-data all 2.74.6-2+deb12u8 [1210 kB] Get:29 http://deb.debian.org/debian bookworm/main amd64 libglib2.0-bin amd64 2.74.6-2+deb12u8 [112 kB] Get:30 http://deb.debian.org/debian bookworm/main amd64 libgstreamer1.0-0 amd64 1.22.0-2+deb12u1 [1170 kB] Get:31 http://deb.debian.org/debian bookworm/main amd64 libpolkit-gobject-1-0 amd64 122-3 [43.9 kB] Get:32 http://deb.debian.org/debian bookworm/main amd64 libpolkit-agent-1-0 amd64 122-3 [24.4 kB] Get:33 http://deb.debian.org/debian bookworm/main amd64 xml-core all 0.18+nmu1 [23.8 kB] Get:34 http://deb.debian.org/debian bookworm/main amd64 polkitd amd64 122-3 [112 kB] Get:35 http://deb.debian.org/debian bookworm/main amd64 packagekit amd64 1.2.6-5 [610 kB] Get:36 http://deb.debian.org/debian bookworm/main amd64 packagekit-tools amd64 1.2.6-5 [30.9 kB] Get:37 http://deb.debian.org/debian bookworm/main amd64 python3-blinker all 1.5-1 [14.7 kB] Get:38 http://deb.debian.org/debian bookworm/main amd64 python3-cffi-backend amd64 1.15.1-5+b1 [84.6 kB] Get:39 http://deb.debian.org/debian bookworm/main amd64 python3-cryptography amd64 38.0.4-3+deb12u1 [665 kB] Get:40 http://deb.debian.org/debian bookworm/main amd64 python3-dbus amd64 1.3.2-4+b1 [95.1 kB] Get:41 http://deb.debian.org/debian bookworm/main amd64 python3-distro all 1.8.0-1 [20.5 kB] Get:42 http://deb.debian.org/debian bookworm/main amd64 python3-gi amd64 3.42.2-3+b1 [219 kB] Get:43 http://deb.debian.org/debian bookworm/main amd64 python3-jwt all 2.6.0-1 [26.6 kB] Get:44 http://deb.debian.org/debian bookworm/main amd64 python3-lazr.uri all 1.0.6-3 [13.7 kB] Get:45 http://deb.debian.org/debian bookworm/main amd64 python3-wadllib all 1.3.6-4 [37.2 kB] Get:46 http://deb.debian.org/debian bookworm/main amd64 python3-oauthlib all 3.2.2-1 [95.4 kB] Get:47 http://deb.debian.org/debian bookworm/main amd64 python3-lazr.restfulclient all 0.14.5-1 [50.4 kB] Get:48 http://deb.debian.org/debian bookworm/main amd64 python3-software-properties all 0.99.30-4.1~deb12u1 [32.9 kB] Get:49 http://deb.debian.org/debian bookworm/main amd64 software-properties-common all 0.99.30-4.1~deb12u1 [62.1 kB] Fetched 16.0 MB in 1s (24.2 MB/s) apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct! apt-listchanges: Reading changelogs… perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_GB:en", LC_ALL = (unset), LC_MONETARY = "es_ES.UTF-8", LC_ADDRESS = "es_ES.UTF-8", LC_TELEPHONE = "es_ES.UTF-8", LC_NAME = "es_ES.UTF-8", LC_MEASUREMENT = "es_ES.UTF-8", LC_IDENTIFICATION = "es_ES.UTF-8", LC_NUMERIC = "es_ES.UTF-8", LC_PAPER = "es_ES.UTF-8", LANG = "en_GB.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_GB.UTF-8"). locale: Cannot set LC_ALL to default locale: No such file or directory Extracting templates from packages: 100% Selecting previously unselected package sgml-base. (Reading database … 37468 … Read more

Configuració del servidor de correu entrant corporatiu (dovecot)

Configuració del servidor de correu entrant corporatiu (dovecot) El primer que farem serà actualitzar les llibreries instal·lades, per a després instal·lar els paquets necessaris amb l’última versió. sudo apt update sudo apt install dovecot-imapd dovecot-pop3d dovecot-lmtpd Resultat comanda vagrant@debian:~$ sudo apt install dovecot-imapd dovecot-pop3d Reading package lists… Done Building dependency tree… Done Reading state information… Done The following additional packages will be installed: dovecot-core libexttextcat-2.0-0 libexttextcat-data liblua5.4-0 libstemmer0d libunwind8 Suggested packages: dovecot-gssapi dovecot-ldap dovecot-lmtpd dovecot-lucene dovecot-managesieved dovecot-mysql dovecot-pgsql dovecot-sieve dovecot-solr dovecot-sqlite dovecot-submissiond ntp ufw The following NEW packages will be installed: dovecot-core dovecot-imapd dovecot-pop3d libexttextcat-2.0-0 libexttextcat-data liblua5.4-0 libstemmer0d libunwind8 0 upgraded, 8 newly installed, 0 to remove and 26 not upgraded. Need to get 7887 kB of archives. After this operation, 17.4 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://deb.debian.org/debian bookworm/main amd64 libexttextcat-data all 3.4.5-1 [164 kB] Get:2 http://deb.debian.org/debian bookworm/main amd64 libexttextcat-2.0-0 amd64 3.4.5-1 [15.9 kB] Get:3 http://deb.debian.org/debian bookworm/main amd64 liblua5.4-0 amd64 5.4.4-3+deb12u1 [137 kB] Get:4 http://deb.debian.org/debian bookworm/main amd64 libstemmer0d amd64 2.2.0-2 [118 kB] Get:5 http://deb.debian.org/debian bookworm/main amd64 libunwind8 amd64 1.6.2-3 [51.2 kB] Get:6 http://deb.debian.org/debian bookworm/main amd64 dovecot-core amd64 1:2.3.19.1+dfsg1-2.1+deb12u1 [4486 kB] Get:7 http://deb.debian.org/debian bookworm/main amd64 dovecot-imapd amd64 1:2.3.19.1+dfsg1-2.1+deb12u1 [1528 kB] Get:8 http://deb.debian.org/debian bookworm/main amd64 dovecot-pop3d amd64 1:2.3.19.1+dfsg1-2.1+deb12u1 [1386 kB] Fetched 7887 kB in 0s (27.1 MB/s) apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct! perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_GB:en", LC_ALL = (unset), LC_MONETARY = "es_ES.UTF-8", LC_ADDRESS = "es_ES.UTF-8", LC_TELEPHONE = "es_ES.UTF-8", LC_NAME = "es_ES.UTF-8", LC_MEASUREMENT = "es_ES.UTF-8", LC_IDENTIFICATION = "es_ES.UTF-8", LC_NUMERIC = "es_ES.UTF-8", LC_PAPER = "es_ES.UTF-8", LANG = "en_GB.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_GB.UTF-8"). locale: Cannot set LC_ALL to default locale: No such file or directory Selecting previously unselected package libexttextcat-data. (Reading database … 36690 files and directories currently installed.) Preparing to unpack …/0-libexttextcat-data_3.4.5-1_all.deb … Unpacking libexttextcat-data (3.4.5-1) … Selecting previously unselected package libexttextcat-2.0-0:amd64. Preparing to unpack …/1-libexttextcat-2.0-0_3.4.5-1_amd64.deb … Unpacking libexttextcat-2.0-0:amd64 (3.4.5-1) … Selecting previously unselected package liblua5.4-0:amd64. Preparing to unpack …/2-liblua5.4-0_5.4.4-3+deb12u1_amd64.deb … Unpacking liblua5.4-0:amd64 (5.4.4-3+deb12u1) … Selecting previously unselected package libstemmer0d:amd64. Preparing to unpack …/3-libstemmer0d_2.2.0-2_amd64.deb … Unpacking libstemmer0d:amd64 (2.2.0-2) … Selecting previously unselected package libunwind8:amd64. Preparing to unpack …/4-libunwind8_1.6.2-3_amd64.deb … Unpacking libunwind8:amd64 (1.6.2-3) … Selecting previously unselected package dovecot-core. Preparing to unpack …/5-dovecot-core_1%3a2.3.19.1+dfsg1-2.1+deb12u1_amd64.deb … Unpacking dovecot-core (1:2.3.19.1+dfsg1-2.1+deb12u1) … Selecting previously unselected package dovecot-imapd. Preparing to unpack …/6-dovecot-imapd_1%3a2.3.19.1+dfsg1-2.1+deb12u1_amd64.deb … Unpacking dovecot-imapd (1:2.3.19.1+dfsg1-2.1+deb12u1) … Selecting previously unselected package dovecot-pop3d. Preparing to unpack …/7-dovecot-pop3d_1%3a2.3.19.1+dfsg1-2.1+deb12u1_amd64.deb … Unpacking dovecot-pop3d (1:2.3.19.1+dfsg1-2.1+deb12u1) … Setting up libunwind8:amd64 (1.6.2-3) … Setting up libexttextcat-data (3.4.5-1) … Setting up liblua5.4-0:amd64 (5.4.4-3+deb12u1) … Setting up libstemmer0d:amd64 (2.2.0-2) … Setting up libexttextcat-2.0-0:amd64 (3.4.5-1) … Setting up dovecot-core (1:2.3.19.1+dfsg1-2.1+deb12u1) … locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/dovecot.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/dovecot-dict-auth.conf.ext with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/dovecot-dict-sql.conf.ext with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/dovecot-sql.conf.ext with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/10-auth.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/10-director.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/10-logging.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/10-mail.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/10-master.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/10-ssl.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/10-tcpwrapper.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/15-lda.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/15-mailboxes.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/90-acl.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/90-plugin.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/90-quota.conf with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/auth-checkpassword.conf.ext with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/auth-deny.conf.ext with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/auth-dict.conf.ext with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/auth-master.conf.ext with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/auth-passwdfile.conf.ext with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/auth-sql.conf.ext with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/auth-static.conf.ext with new version locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/auth-system.conf.ext with new version Created symlink /etc/systemd/system/multi-user.target.wants/dovecot.service → /lib/systemd/system/dovecot.service. dovecot.socket is a disabled or a static unit, not starting it. Setting up dovecot-imapd (1:2.3.19.1+dfsg1-2.1+deb12u1) … locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/20-imap.conf with new version Setting up dovecot-pop3d (1:2.3.19.1+dfsg1-2.1+deb12u1) … locale: Cannot set LC_ALL to default locale: No such file or directory Creating config file /etc/dovecot/conf.d/20-pop3.conf with new version Processing triggers for man-db (2.11.2-2) … Processing triggers for libc-bin (2.36-9+deb12u13) … Processing triggers for dovecot-core (1:2.3.19.1+dfsg1-2.1+deb12u1) vagrant@debian:~$ sudo apt install dovecot-imapd dovecot-pop3d Reading package lists… Done … Read more

Recurs compartit públic de només lectura

Recurs compartit públic de només lectura Per començar el primer que farem serà crear la carpeta la qual després configurarem els permisos perquè sigui únicament lectura. sudo mkdir -p /srv/samba/nom_carpeta Ara una vegada creada haurem de configurar-li els permisos aquesta carpeta, un punt molt important si volem que estigui ben protegida i com ens demanen únicament lectura, que per fer això es faran dues conjugacions una als permisos de la carpeta i un altre a la configuració del servei SAMBA.He assignat el propietari a root i permisos 755. Això garanteix que qualsevol usuari del sistema pugui llegir i llistar fitxers, però només l’administrador pugui modificar-los, complint amb el que ens demana a la tasca. sudo chown -R root:root /srv/samba/publico sudo chmod -R 755 /srv/samba/publico I per finalitzar farem la configuració als arxius de configuració de SAMBA, configurarem perquè aquesta carpeta sigui únicament lectura, a l’apartat de read only = yes. [Publico] comment = Carpeta de solo lectura para todos los empleados path = /srv/samba/publico browseable = yes read only = yes guest ok = yes I per ultim per aplicar tota la configuracio feta haurem de fer un reinici del servei SAMBA. sudo systemctl restart smbd Configuracio de SAMBA final #======================= Global Settings ======================= [global] workgroup = grup3 #### Debugging/Accounting #### log file = /var/log/samba/log.%m max log size = 1000 logging = file panic action = /usr/share/samba/panic-action %d ####### Authentication ####### server role = standalone server obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* . pam password change = yes map to guest = bad user ############ Misc ############ usershare allow guests = yes #======================= Share Definitions ======================= [homes] comment = Home Directories browseable = no read only = yes create mask = 0700 directory mask = 0700 valid users = %S [printers] comment = All Printers browseable = no path = /var/tmp printable = yes guest ok = no read only = yes create mask = 0700 [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no [documents] comment = Carpeta compartida grup3 path = /srv/samba/compartido browseable = yes read only = no guest ok = no valid users = vagrant [Publico] comment = Carpeta de solo lectura path = /srv/samba/publico browseable = yes read only = yes guest ok = yes Comrpovacions Per accedir a les carpetes usarem el programa de executar, que es obra amb win-r aqui dintre haurem de posar \+ ip Servidor Samba en el nostre cas \192.168.100.134. Una vegada li donem a ok estarem dintre de les carpetes creades, i entrarem a la carpeta publico que és la carpeta que acabem de crear, i farem unes comprovacions per veure que aquesta tot ben configurada.   Ara per fer una comprovació intentarem crear un arxiu bàsic .txt i veurem que clarament ens dona un error d’accés denegat. I per fer una altra comprovació he creat un arxiu des de pamaquina principal i he intentat burrera des del Windows i com es veu no tens permisos per esborrar-la  I per últim he comprovat si està correctament configurat i he entrat dintre del .txt per veure si puc veure el contingut i sí. #======================= Global Settings ======================= [global] workgroup = grup3 #### Debugging/Accounting #### log file = /var/log/samba/log.%m max log size = 1000 logging = file panic action = /usr/share/samba/panic-action %d ####### Authentication ####### server role = standalone server obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* . pam password change = yes map to guest = bad user ############ Misc ############ usershare allow guests = yes #======================= Share Definitions ======================= [homes] comment = Home Directories browseable = no read only = yes create mask = 0700 directory mask = 0700 valid users = %S [printers] comment = All Printers browseable = no path = /var/tmp printable = yes guest ok = no read only = yes create mask = 0700 [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no [documents] comment = Carpeta compartida grup3 path = /srv/samba/compartido browseable = yes read only = no guest ok = no valid users = vagrant [Publico] comment = Carpeta de solo lectura path = /srv/samba/publico browseable = yes read only = yes guest ok = yes Per accedir a les carpetes usarem el programa de executar, que es obra amb win-r aqui dintre haurem de posar \+ ip Servidor Samba en el nostre cas \192.168.100.134. Una vegada li donem a ok estarem dintre de les carpetes creades, i entrarem a la carpeta publico que és la carpeta que acabem de crear, i farem unes comprovacions per veure que aquesta tot ben configurada.   Ara per fer una comprovació intentarem crear un arxiu bàsic .txt i veurem que clarament ens dona un error d’accés denegat. I per fer una altra comprovació he creat un arxiu des de pamaquina principal i he intentat burrera des del Windows i com es veu no tens permisos per esborrar-la  I per últim he comprovat si està correctament configurat i he entrat dintre del .txt per veure si puc veure el contingut i sí.

Configuració del servidor SAMBA

Configuració del servidor SAMBA El primer que farem serà actualitzar els repositoris instal·lats sudo apt update Despres farem l’instalacios dels paquets oficials de samba i quan ens pregunti Y/N clicarem y i intro  sudo apt install samba samba-common-bin Resultat de la comanda vagrant@debian:~$ sudo apt install samba samba-common-bin Reading package lists… Done Building dependency tree… Done Reading state information… Done The following additional packages will be installed: attr dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv ibverbs-providers libassuan0 libavahi-client3 libavahi-common-data libavahi-common3 libboost-iostreams1.74.0 libboost-thread1.74.0 libcephfs2 libcups2 libfmt9 libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 libgpgme11 libgpm2 libibverbs1 libksba8 libldb2 libncurses6 libnpth0 libpython3.11 librados2 librdmacm1 libtalloc2 libtdb1 libtevent0 liburing2 libwbclient0 libyaml-0-2 pinentry-curses python3-anyio python3-cffi-backend python3-click python3-colorama python3-cryptography python3-dnspython python3-gpg python3-h11 python3-h2 python3-hpack python3-httpcore python3-httpx python3-hyperframe python3-ldb python3-markdown python3-markdown-it python3-mdurl python3-pygments python3-requests-toolbelt python3-rfc3986 python3-rich python3-samba python3-sniffio python3-talloc python3-tdb python3-yaml samba-ad-provision samba-common samba-dsdb-modules samba-libs samba-vfs-modules tdb-tools Suggested packages: pinentry-gnome3 tor parcimonie xloadimage scdaemon cups-common gpm pinentry-doc python-cryptography-doc python3-cryptography-vectors python3-trio python3-aioquic python-markdown-doc python-pygments-doc ttf-bitstream-vera ctdb ldb-tools ntp | chrony ufw winbind heimdal-clients The following NEW packages will be installed: attr dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm ibverbs-providers libassuan0 libavahi-client3 libavahi-common-data libavahi-common3 libboost-iostreams1.74.0 libboost-thread1.74.0 libcephfs2 libcups2 libfmt9 libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 libgpgme11 libgpm2 libibverbs1 libksba8 libldb2 libncurses6 libnpth0 libpython3.11 librados2 librdmacm1 libtalloc2 libtdb1 libtevent0 liburing2 libwbclient0 libyaml-0-2 pinentry-curses python3-anyio python3-cffi-backend python3-click python3-colorama python3-cryptography python3-dnspython python3-gpg python3-h11 python3-h2 python3-hpack python3-httpcore python3-httpx python3-hyperframe python3-ldb python3-markdown python3-markdown-it python3-mdurl python3-pygments python3-requests-toolbelt python3-rfc3986 python3-rich python3-samba python3-sniffio python3-talloc python3-tdb python3-yaml samba samba-ad-provision samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules tdb-tools The following packages will be upgraded: gpgv 1 upgraded, 76 newly installed, 0 to remove and 21 not upgraded. Need to get 44.6 MB of archives. After this operation, 153 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://deb.debian.org/debian bookworm/main amd64 python3-dnspython all 2.3.0-1 [152 kB] Get:2 http://deb.debian.org/debian bookworm/main amd64 libtalloc2 amd64 2.4.0-f2 [25.6 kB] Get:3 http://deb.debian.org/debian bookworm/main amd64 libtdb1 amd64 1.4.8-2 [44.5 kB] Get:4 http://deb.debian.org/debian bookworm/main amd64 libtevent0 amd64 0.14.1-1 [37.9 kB] Get:5 http://deb.debian.org/debian bookworm/main amd64 libldb2 amd64 2:2.6.2+samba4.17.12+dfsg-0+deb12u3 [162 kB] Get:6 http://deb.debian.org/debian bookworm/main amd64 libpython3.11 amd64 3.11.2-6+deb12u6 [1987 kB] Get:7 http://deb.debian.org/debian bookworm/main amd64 python3-ldb amd64 2:2.6.2+samba4.17.12+dfsg-0+deb12u3 [61.3 kB] Get:8 http://deb.debian.org/debian bookworm/main amd64 python3-tdb amd64 1.4.8-2 [16.5 kB] Get:9 http://deb.debian.org/debian bookworm/main amd64 libavahi-common-data amd64 0.8-10+deb12u1 [107 kB] Get:10 http://deb.debian.org/debian bookworm/main amd64 libavahi-common3 amd64 0.8-10+deb12u1 [42.1 kB] Get:11 http://deb.debian.org/debian bookworm/main amd64 libavahi-client3 amd64 0.8-10+deb12u1 [45.8 kB] Get:12 http://deb.debian.org/debian bookworm/main amd64 libwbclient0 amd64 2:4.17.12+dfsg-0+deb12u3 [54.5 kB] Get:13 http://deb.debian.org/debian bookworm/main amd64 samba-libs amd64 2:4.17.12+dfsg-0+deb12u3 [5657 kB] Get:14 http://deb.debian.org/debian bookworm/main amd64 python3-talloc amd64 2.4.0-f2 [14.5 kB] Get:15 http://deb.debian.org/debian bookworm/main amd64 python3-samba amd64 2:4.17.12+dfsg-0+deb12u3 [2827 kB] Get:16 http://deb.debian.org/debian bookworm/main amd64 samba-common all 2:4.17.12+dfsg-0+deb12u3 [88.4 kB] Get:17 http://deb.debian.org/debian bookworm/main amd64 libcups2 amd64 2.4.2-3+deb12u9 [245 kB] Get:18 http://deb.debian.org/debian bookworm/main amd64 libncurses6 amd64 6.4-4 [103 kB] Get:19 http://deb.debian.org/debian bookworm/main amd64 samba-common-bin amd64 2:4.17.12+dfsg-0+deb12u3 [1179 kB] Get:20 http://deb.debian.org/debian bookworm/main amd64 tdb-tools amd64 1.4.8-2 [26.6 kB] Get:21 http://deb.debian.org/debian bookworm/main amd64 samba amd64 2:4.17.12+dfsg-0+deb12u3 [947 kB] Get:22 http://deb.debian.org/debian bookworm/main amd64 gpgv amd64 2.2.40-1.1+deb12u2 [649 kB] Get:23 http://deb.debian.org/debian bookworm/main amd64 attr amd64 1:2.5.1-4 [41.2 kB] Get:24 http://deb.debian.org/debian bookworm/main amd64 libassuan0 amd64 2.5.5-5 [48.5 kB] Get:25 http://deb.debian.org/debian bookworm/main amd64 gpgconf amd64 2.2.40-1.1+deb12u2 [565 kB] Get:26 http://deb.debian.org/debian bookworm/main amd64 libksba8 amd64 1.6.3-2 [128 kB] Get:27 http://deb.debian.org/debian bookworm/main amd64 libnpth0 amd64 1.6-3 [19.0 kB] Get:28 http://deb.debian.org/debian bookworm/main amd64 dirmngr amd64 2.2.40-1.1+deb12u2 [793 kB] Get:29 http://deb.debian.org/debian bookworm/main amd64 gnupg-l10n all 2.2.40-1.1+deb12u2 [1093 kB] Get:30 http://deb.debian.org/debian bookworm/main amd64 gnupg-utils amd64 2.2.40-1.1+deb12u2 [927 kB] Get:31 http://deb.debian.org/debian bookworm/main amd64 gpg amd64 2.2.40-1.1+deb12u2 [950 kB] Get:32 http://deb.debian.org/debian bookworm/main amd64 pinentry-curses amd64 1.2.1-1 [77.4 kB] Get:33 http://deb.debian.org/debian bookworm/main amd64 gpg-agent amd64 2.2.40-1.1+deb12u2 [695 kB] Get:34 http://deb.debian.org/debian bookworm/main amd64 gpg-wks-client amd64 2.2.40-1.1+deb12u2 [541 kB] Get:35 http://deb.debian.org/debian bookworm/main amd64 gpg-wks-server amd64 2.2.40-1.1+deb12u2 [531 kB] Get:36 http://deb.debian.org/debian bookworm/main amd64 gpgsm amd64 2.2.40-1.1+deb12u2 [671 kB] Get:37 http://deb.debian.org/debian bookworm/main amd64 gnupg all 2.2.40-1.1+deb12u2 [846 kB] Get:38 http://deb.debian.org/debian bookworm/main amd64 libibverbs1 amd64 44.0-2 [60.7 kB] Get:39 http://deb.debian.org/debian bookworm/main amd64 ibverbs-providers amd64 44.0-2 [335 kB] Get:40 http://deb.debian.org/debian bookworm/main amd64 libboost-iostreams1.74.0 amd64 1.74.0+ds1-21 [240 kB] Get:41 http://deb.debian.org/debian bookworm/main amd64 libboost-thread1.74.0 amd64 1.74.0+ds1-21 [257 kB] Get:42 http://deb.debian.org/debian bookworm/main amd64 libfmt9 amd64 9.1.0+ds1-2 [113 kB] Get:43 http://deb.debian.org/debian bookworm/main amd64 librdmacm1 amd64 44.0-2 [68.6 kB] Get:44 http://deb.debian.org/debian bookworm/main amd64 librados2 amd64 16.2.15+ds-0+deb12u1 [3249 kB] Get:45 http://deb.debian.org/debian bookworm/main amd64 libcephfs2 amd64 16.2.15+ds-0+deb12u1 [720 kB] Get:46 http://deb.debian.org/debian bookworm/main amd64 libgfxdr0 amd64 10.3-5 [3106 kB] Get:47 http://deb.debian.org/debian bookworm/main amd64 libglusterfs0 amd64 10.3-5 [3347 kB] Get:48 http://deb.debian.org/debian bookworm/main amd64 libgfrpc0 amd64 10.3-5 [3131 kB] Get:49 http://deb.debian.org/debian bookworm/main amd64 libgfapi0 amd64 10.3-5 [3158 kB] Get:50 http://deb.debian.org/debian bookworm/main amd64 libgpgme11 amd64 1.18.0-3+b1 [300 kB] Get:51 http://deb.debian.org/debian bookworm/main amd64 libgpm2 amd64 1.20.7-10+b1 [14.2 kB] Get:52 http://deb.debian.org/debian bookworm/main amd64 liburing2 amd64 2.3-3 [12.6 kB] Get:53 http://deb.debian.org/debian bookworm/main amd64 libyaml-0-2 amd64 0.2.5-1 [53.6 kB] Get:54 http://deb.debian.org/debian bookworm/main amd64 python3-sniffio all 1.2.0-1 [6372 B] Get:55 http://deb.debian.org/debian bookworm/main amd64 python3-anyio all 3.6.2-1 [54.0 kB] Get:56 http://deb.debian.org/debian bookworm/main amd64 python3-cffi-backend amd64 1.15.1-5+b1 [84.6 kB] Get:57 http://deb.debian.org/debian bookworm/main amd64 python3-colorama all 0.4.6-2 [36.8 kB] Get:58 http://deb.debian.org/debian bookworm/main amd64 python3-click all 8.1.3-2 [92.2 kB] Get:59 http://deb.debian.org/debian bookworm/main amd64 python3-cryptography amd64 38.0.4-3+deb12u1 [665 kB] Get:60 http://deb.debian.org/debian bookworm/main amd64 python3-gpg amd64 1.18.0-3+b1 [363 kB] Get:61 http://deb.debian.org/debian bookworm/main amd64 python3-h11 all 0.14.0-1.1~deb12u1 [50.6 kB] Get:62 http://deb.debian.org/debian bookworm/main amd64 python3-hpack all 4.0.0-2 [25.0 kB] Get:63 http://deb.debian.org/debian bookworm/main amd64 python3-hyperframe all 6.0.0-1 [14.5 kB] Get:64 http://deb.debian.org/debian bookworm/main amd64 python3-h2 all 4.1.0-4 [80.8 kB] Get:65 http://deb.debian.org/debian bookworm/main amd64 python3-httpcore all 0.16.3-1 [38.4 kB] Get:66 http://deb.debian.org/debian bookworm/main amd64 python3-pygments all 2.14.0+dfsg-1 [783 kB] Get:67 http://deb.debian.org/debian bookworm/main amd64 python3-mdurl all 0.1.2-1 [9444 B] Get:68 http://deb.debian.org/debian bookworm/main amd64 python3-markdown-it all 2.1.0-5 [58.8 kB] Get:69 http://deb.debian.org/debian bookworm/main amd64 python3-rich all 13.3.1-1 [202 kB] Get:70 http://deb.debian.org/debian bookworm/main amd64 python3-rfc3986 all 1.5.0-2 [22.2 kB] Get:71 http://deb.debian.org/debian bookworm/main amd64 python3-httpx all 0.23.3-1 [72.3 kB] Get:72 http://deb.debian.org/debian bookworm/main amd64 python3-markdown all 3.4.1-2 [64.7 kB] Get:73 http://deb.debian.org/debian bookworm/main amd64 python3-requests-toolbelt all 0.10.1-1 [41.3 kB] Get:74 http://deb.debian.org/debian bookworm/main amd64 python3-yaml amd64 6.0-3+b2 [119 kB] Get:75 http://deb.debian.org/debian bookworm/main amd64 samba-ad-provision all 2:4.17.12+dfsg-0+deb12u3 [416 kB] Get:76 http://deb.debian.org/debian bookworm/main amd64 samba-dsdb-modules amd64 2:4.17.12+dfsg-0+deb12u3 [317 kB] Get:77 http://deb.debian.org/debian bookworm/main amd64 samba-vfs-modules amd64 2:4.17.12+dfsg-0+deb12u3 [428 kB] Fetched 44.6 MB in 1s (40.4 MB/s) apt-listchanges: Can't set locale; … Read more

Connexió client Linux

Connexió client Linux Per fer la connexió el primer que hem de fer és fer la instal·lació dels paquets necessaris per fer aquesta connexió, utilitzarem aquestes dues comandes, la primera per actualitzar tots els paquets actuals no és necessari, però és recomanable i la segona per instal·lar els paquets que volem. sudo apt update sudo apt install realmd sssd sssd-tools libnss-sss libpam-sss adcli samba-common-bin packagekit Una vegada instal·lats els paquets primer que farem serà verificar que la nostra màquina Ubuntu detecta el domini, ambl a seguent comanda. vagrant@super-VirtualBox:~$ sudo realm discover 192.168.100.133 grup3.lan type: kerberos realm-name: GRUP3.LAN domain-name: grup3.lan configured: no server-software: active-directory client-software: sssd required-package: sssd-tools required-package: sssd required-package: libnss-sss required-package: libpam-sss required-package: adcli required-package: samba-common-bin Ara “presentarem” la màquina Ubuntu al servidor Windows. Necessitaràs un compte amb permisos per unir equips al domini. I la -U us diu que utilitzeu l’usuari “Administrador” per autenticar la unió. Us demanarà la contrasenya d’aquest administrador de Windows. En acabar, el teu Ubuntu ja serà “part” de la xarxa de Windows. vagrant@super-VirtualBox:~$ sudo realm join -v -U vagrant 192.168.100.133 Resultat comanda * Performing LDAP DSE lookup on: 192.168.100.133 * Successfully discovered: grup3.lan Password for vagrant: * Unconditionally checking packages * Resolving required packages * Joining using a truncated netbios name: SUPER-VIRTUALBO * LANG=C /usr/sbin/adcli join –verbose –domain grup3.lan –domain-realm GRUP3.LAN –domain-controller 192.168.100.133 –computer-name SUPER-VIRTUALBO –login-type user –login-user vagrant –stdin-password * Using domain name: grup3.lan * Using computer account name: SUPER-VIRTUALBO * Using domain realm: grup3.lan * Sending NetLogon ping to domain controller: 192.168.100.133 * Received NetLogon info from: WIN-2ISUSQIBKRU.grup3.lan * Wrote out krb5.conf snippet to /var/cache/realmd/adcli-krb5-YZmcXy/krb5.d/adcli-krb5-conf-FJSyY3 * Authenticated as user: vagrant@GRUP3.LAN * Using GSS-SPNEGO for SASL bind * Looked up short domain name: GRUP3 * Looked up domain SID: S-1-5-21-2037980830-2354978206-3898932875 * Received NetLogon info from: WIN-2ISUSQIBKRU.grup3.lan * Using fully qualified name: super-VirtualBox * Using domain name: grup3.lan * Using computer account name: SUPER-VIRTUALBO * Using domain realm: grup3.lan * Enrolling computer name: SUPER-VIRTUALBO * Generated 120 character computer password * Using keytab: FILE:/etc/krb5.keytab * A computer account for SUPER-VIRTUALBO$ does not exist * Found well known computer container at: CN=Computers,DC=grup3,DC=lan * Calculated computer account: CN=SUPER-VIRTUALBO,CN=Computers,DC=grup3,DC=lan * Encryption type [3] not permitted. * Encryption type [1] not permitted. * Created computer account: CN=SUPER-VIRTUALBO,CN=Computers,DC=grup3,DC=lan * Trying to set computer password with Kerberos * Set computer password * Retrieved kvno '2' for computer account in directory: CN=SUPER-VIRTUALBO,CN=Computers,DC=grup3,DC=lan * Checking RestrictedKrbHost/super-VirtualBox * Added RestrictedKrbHost/super-VirtualBox * Checking RestrictedKrbHost/SUPER-VIRTUALBO * Added RestrictedKrbHost/SUPER-VIRTUALBO * Checking host/super-VirtualBox * Added host/super-VirtualBox * Checking host/SUPER-VIRTUALBO * Added host/SUPER-VIRTUALBO * Discovered which keytab salt to use * Added the entries to the keytab: SUPER-VIRTUALBO$@GRUP3.LAN: FILE:/etc/krb5.keytab * Added the entries to the keytab: host/SUPER-VIRTUALBO@GRUP3.LAN: FILE:/etc/krb5.keytab * Added the entries to the keytab: host/super-VirtualBox@GRUP3.LAN: FILE:/etc/krb5.keytab * Added the entries to the keytab: RestrictedKrbHost/SUPER-VIRTUALBO@GRUP3.LAN: FILE:/etc/krb5.keytab * Added the entries to the keytab: RestrictedKrbHost/super-VirtualBox@GRUP3.LAN: FILE:/etc/krb5.keytab * /usr/sbin/update-rc.d sssd enable * /usr/sbin/service sssd restart * Successfully enrolled machine in realm * Performing LDAP DSE lookup on: 192.168.100.133 * Successfully discovered: grup3.lan Password for vagrant: * Unconditionally checking packages * Resolving required packages * Joining using a truncated netbios name: SUPER-VIRTUALBO * LANG=C /usr/sbin/adcli join –verbose –domain grup3.lan –domain-realm GRUP3.LAN –domain-controller 192.168.100.133 –computer-name SUPER-VIRTUALBO –login-type user –login-user vagrant –stdin-password * Using domain name: grup3.lan * Using computer account name: SUPER-VIRTUALBO * Using domain realm: grup3.lan * Sending NetLogon ping to domain controller: 192.168.100.133 * Received NetLogon info from: WIN-2ISUSQIBKRU.grup3.lan * Wrote out krb5.conf snippet to /var/cache/realmd/adcli-krb5-YZmcXy/krb5.d/adcli-krb5-conf-FJSyY3 * Authenticated as user: vagrant@GRUP3.LAN * Using GSS-SPNEGO for SASL bind * Looked up short domain name: GRUP3 * Looked up domain SID: S-1-5-21-2037980830-2354978206-3898932875 * Received NetLogon info from: WIN-2ISUSQIBKRU.grup3.lan * Using fully qualified name: super-VirtualBox * Using domain name: grup3.lan * Using computer account name: SUPER-VIRTUALBO * Using domain realm: grup3.lan * Enrolling computer name: SUPER-VIRTUALBO * Generated 120 character computer password * Using keytab: FILE:/etc/krb5.keytab * A computer account for SUPER-VIRTUALBO$ does not exist * Found well known computer container at: CN=Computers,DC=grup3,DC=lan * Calculated computer account: CN=SUPER-VIRTUALBO,CN=Computers,DC=grup3,DC=lan * Encryption type [3] not permitted. * Encryption type [1] not permitted. * Created computer account: CN=SUPER-VIRTUALBO,CN=Computers,DC=grup3,DC=lan * Trying to set computer password with Kerberos * Set computer password * Retrieved kvno '2' for computer account in directory: CN=SUPER-VIRTUALBO,CN=Computers,DC=grup3,DC=lan * Checking RestrictedKrbHost/super-VirtualBox * Added RestrictedKrbHost/super-VirtualBox * Checking RestrictedKrbHost/SUPER-VIRTUALBO * Added RestrictedKrbHost/SUPER-VIRTUALBO * Checking host/super-VirtualBox * Added host/super-VirtualBox * Checking host/SUPER-VIRTUALBO * Added host/SUPER-VIRTUALBO * Discovered which keytab salt to use * Added the entries to the keytab: SUPER-VIRTUALBO$@GRUP3.LAN: FILE:/etc/krb5.keytab * Added the entries to the keytab: host/SUPER-VIRTUALBO@GRUP3.LAN: FILE:/etc/krb5.keytab * Added the entries to the keytab: host/super-VirtualBox@GRUP3.LAN: FILE:/etc/krb5.keytab * Added the entries to the keytab: RestrictedKrbHost/SUPER-VIRTUALBO@GRUP3.LAN: FILE:/etc/krb5.keytab * Added the entries to the keytab: RestrictedKrbHost/super-VirtualBox@GRUP3.LAN: FILE:/etc/krb5.keytab * /usr/sbin/update-rc.d sssd enable * /usr/sbin/service sssd restart * Successfully enrolled machine in realm Una vegada ja hem establert una connexió entre el client i el servidor, farem una comprovació per veure si la màquina troba a l’usuari el qual es vincularà. vagrant@super-VirtualBox:~$ id scano uid=190801121(scano) gid=190800513(domain users) groups=190800513(domain users) I per terminar farem l’última prova que serà anar al Active Directory per veure si ha reconegut a la màquina, per fer-ho anirem a l’apartat de Computers, on ens sortiran tots els clients connectats al nostre AD, i com es pot veure ens surten els dos clients que tenim connectat al AD, el desktop és el Windows 10 client, i el Super és el nostre Linux.

Pla de contingència

Pla de contingència 1. Informe de Programari Maliciós i Amenaces Per garantir la seguretat del Sistema Operatiu (SO) de la nostra empresa, hem identificat els tipus de programari maliciós que podrien infectar els nostres equips i dades: Ransomware: L’amenaça més greu per a la continuïtat del negoci. Xifra els fitxers i exigeix un rescat. El combatem amb còpies de seguretat externes i aïllades. Spyware: Programari que s’instal·la per recollir informació sense permís (contrasenyes, dades bancàries). Adware: Tot i que sembla només molest (publicitat), pot ser la porta d’entrada a codi més perillós i redueix el rendiment del sistema. Troians: Programes que s’amaguen dins de fitxers aparentment segurs per obrir una porta del darrere (backdoor) al nostre servidor. Cucs (Worms): Tenen la capacitat de replicar-se i saltar d’un ordinador a un altre a través de la xarxa de l’empresa sense intervenció de l’usuari. 2. Protocol de Revisió i Control d’Infeccions Per assegurar que no hi ha presència de cap tipus de programari maliciós, el nostre pla de contingència estableix el següent protocol de revisió: Auditoria d’Integritat: Revisarem periòdicament que els fitxers vitals del sistema (com el nucli del SO o fitxers de configuració de xarxa) no hagin estat modificats. Anàlisi Heurística i de Signatures: Utilitzarem eines de protecció que busquen tant virus coneguts (signatures) com comportaments estranys del programari (heurística). Monitorització de Processos: Es realitzarà una revisió dels processos actius a la memòria RAM per detectar execucions sospitoses que no corresponguin a programari autoritzat. 3. Simulacres en entorns de proves Per fer un simulacre utilitzarem el Windows 10 client en la VLAN de test, aquesta màquina virtual estarà en moda nada, per tindre un millor nivell de seguretat, al no sortir a internet i quedar-se d’una manera local, usarem l’antivirus de Windows, i instal·larem un spyware, per veure com reacciona el sistema. 

Creació de l’estructura organitzativa de l’empresa

Creació de l’estructura organitzativa de l’empresa El primer que farem per començar a crear la nostra estructura organitzativa prèviament creada, serà obrir l’Active Directory Users And Computers, aquí és on s’administren els usuaris, els ordinadors connectats al Active Directory, etc. Ara el prime que farem sera crear la la primera OU, per crearla anirem al Domini, farem click dret, anirem a new i a Unitat organitzativa Una vegada cliquem dintre de crear assignarem el nom per aquest OU, i ja estaria creada la unitat organitzativa  I ja estaria feta l’organització de la nostra empresa.

Disseny de l’estructura organitzativa de l’empresa

Disseny de l’estructura organitzativa de l’empresa Per fer l’estructura de l’empresa en un organigrama vaig fer servir gèmini perquè amb un promet ben estructurat amb tots els paràmetres, em generi el code mermaid, que després l’aplicaria en la pàgina mermaidchart, la qual es un editor, de codi mermaid, llavors pots aplicar-li al teu codi i després fer modificacions.  Resultat Final

Activació del servei de Directory en W2k19

Activació del servei de Directory en W2k19 El primer que hem de fer serà anar a l’aplicació de server mànager, una vegada dintre clicarem a Add roles and features, que és on s’instal·laran els serveis com el AD, DNS, DHCP, etc Una vegada dintre seleccionarem la primera opció i Next  En aquesta pestanya seleccionarem el servidor el qual volen fer la instal·lació. Ara per continuar seleccionarem el servei que volem instal·lar que en el nostre cas és únicament l’Active Directory, seleccionarem la casella del servei que vulguem instal·lar. I quan seleccionem un servei se’ns obrirà aquesta petita pestanya on únicament donarem Add Features, i Next I ja hauríem acabat la instal·lació del servei, ara únicament ens quedarà esperar