system-analyst
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    **Elección del Sistema Operativo GNU/Linux** Para este proyecto se eligió Ubuntu Server 22.04 LTS debido a su: • Facilidad de uso y documentación extensa. • Requisitos de hardware bajos, compatible con equipos antiguos. • Compatibilidad nativa con Samba. **1. Instalación de Samba** Primero, hay que asegurarse que el sistema este actualizado y luego instalar el paquete de Samba. ```bash sudo apt update ``` ```bash sudo apt install -y samba ``` ![Screenshot from 2024-11-08 00-51-43.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/e0e233d1-5c11-42f2-a1c6-473e3f9dc463/a8cbceac-dd62-4a7f-b79b-2479836dfacf/Screenshot_from_2024-11-08_00-51-43.png) ![Screenshot from 2024-11-08 00-53-03.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/e0e233d1-5c11-42f2-a1c6-473e3f9dc463/abd0504f-9175-4fe4-898f-b608a4e9e273/Screenshot_from_2024-11-08_00-53-03.png) **2. Verificación de la Instalación** Para comprobar que Samba se instaló correctamente, se ejecuta el siguiente comando para verificar el estado del servicio. ```bash sudo systemctl status smbd ``` **3. Configuración de Samba** El archivo principal de configuración de Samba es **/etc/samba/smb.conf.** Antes de hacer cualquier cambio, es recomendable hacer una copia de seguridad del archivo de configuración original ```bash sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak ``` Luego, editar el archivo de configuración: ```bash sudo nano /etc/samba/smb.conf ``` Dentro de este archivo, hay que definir las carpetas compartidas. <aside> 💡 El archivo de configuración de Samba (/etc/samba/smb.conf) se compone de secciones organizadas por categorías, que especifican tanto la configuración general del servidor como las opciones de cada recurso compartido. **[global]**: Esta sección contiene la configuración general y las opciones del servidor Samba. Aquí defines parámetros que afectan a todo el servidor, como el nombre de red, permisos generales y ajustes de seguridad. Ejemplo: ``` [global] workgroup = WORKGROUP         *# Nombre del grupo de trabajo en la red.* server string = Samba Server  *# Descripción del servidor.* netbios name = NOMBRE_SERVIDOR *# Nombre del servidor en la red.* security = user           *# Configuración de seguridad (modo usuario).* ``` 2. **Secciones de recursos compartidos**: Cada carpeta o recurso que quieras compartir tiene su propia sección. El nombre entre corchetes ([compartida]) es el nombre que verán los usuarios en la red. En esta sección se especifican opciones particulares para ese recurso, como la ruta, los permisos y los usuarios permitidos. Ejemplo: ``` [compartida] path = /home/usuario/compartida   *# Ruta de la carpeta compartida.* browseable = yes                  *# Hace que sea visible en la red.* read only = no                    *# Permite o no modificar archivos.* writable = yes                    *# Permite escritura en la carpeta.* guest ok = no                     *# Prohíbe acceso a invitados.* valid users = usuario             *# Especifica qué usuarios pueden acceder.* ``` 3. **Opciones comunes en cada sección de recursos**: • **path**: Especifica la ubicación de la carpeta compartida. • **browseable**: Determina si el recurso es visible en la red. • **read only** y **writable**: Controlan si el recurso es de solo lectura o permite escritura. • **guest ok**: Permite o deniega acceso sin autenticación. • **valid users**: Define los usuarios que pueden acceder a este recurso. En resumen, el archivo de configuración de Samba se organiza en una sección [global] para la configuración del servidor y varias secciones de recursos compartidos, cada una personalizada para definir el acceso y los permisos de carpetas específicas en la red. </aside> Para configurar una carpeta compartida, este seria el ejemplo: ``` [compartida] path = /home/usuario/compartida browseable = yes read only = no writable = yes guest ok = no valid users = usuario ``` • **path**: Ruta de la carpeta que quieres compartir. • **browseable**: Hace que la carpeta sea visible para los clientes. • **read only**: Permite escritura si se establece en no. • **guest ok**: Permite acceso de invitados si se establece en yes. • **valid users**: Define qué usuarios pueden acceder a esta carpeta. ![Screenshot from 2024-11-11 15-56-05.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/e0e233d1-5c11-42f2-a1c6-473e3f9dc463/6be14fb0-683d-4e6c-b806-fea4631d1735/Screenshot_from_2024-11-11_15-56-05.png) **4. Crear un Usuario Samba** Crea un usuario en Samba para que tenga acceso a la carpeta compartida. Si ya tenes un usuario en el sistema (por ejemplo, usuario), puedes agregarlo a Samba así: ```bash sudo smbpasswd -a usuario ``` Seguir las instrucciones para crear la contraseña. ![Screenshot from 2024-11-11 16-14-32.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/e0e233d1-5c11-42f2-a1c6-473e3f9dc463/68633ec7-91fd-4ca3-9685-25dd807c0c86/Screenshot_from_2024-11-11_16-14-32.png) **5. Crear la Carpeta Compartida y Asignar Permisos** Crea la carpeta para compartir (si no existe) y asigna permisos para el usuario: ```bash mkdir -p /home/usuario/compartida ``` ```bash sudo chown usuario:usuario /home/usuario/compartida ``` ```bash sudo chmod 2770 /home/usuario/compartida ``` ![Screenshot from 2024-11-11 15-44-08.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/e0e233d1-5c11-42f2-a1c6-473e3f9dc463/6e3c01e0-71cd-4b29-b97d-b1562dcec9c0/Screenshot_from_2024-11-11_15-44-08.png) **6. Reiniciar el Servicio Samba** Después de realizar los cambios en el archivo de configuración, hay que reiniciar el servicio de Samba para aplicar los ajustes. ```bash sudo systemctl restart smbd ``` ![Screenshot from 2024-11-08 01-00-56.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/e0e233d1-5c11-42f2-a1c6-473e3f9dc463/636cc21f-823c-41d0-8294-eb04241d23ef/Screenshot_from_2024-11-08_01-00-56.png) **7. Verificar el Estado del Servicio** Confirmar que el servicio está activo y funcionando. ```bash sudo systemctl status smbd ``` **8. Acceder a la Carpeta Compartida** En una computadora cliente, se puede acceder a la carpeta compartida desde el explorador de archivos. En Windows, escribe \\[IP_DE_TU_SERVIDOR]\compartida en el Explorador de archivos. En Mac, a **Ir > Conectar al servidor** y usa smb://[IP_DE_TU_SERVIDOR]/compartida. **Comandos Útiles para Administrar Samba** | **Comando** | **Descripción** | | --- | --- | | sudo systemctl start smbd | Inicia el servicio de Samba. | | sudo systemctl stop smbd | Detiene el servicio de Samba. | | sudo systemctl restart smbd | Reinicia el servicio de Samba. | | sudo smbpasswd -a usuario | Agrega un usuario a Samba y establece una contraseña. | | sudo pdbedit -L | Lista todos los usuarios de Samba. | | testparm | Verifica la configuración de Samba en busca de errores. | | sudo ufw allow samba | Permite el tráfico Samba a través del firewall de Ubuntu. | | smbclient -L localhost -U usuario | Muestra los recursos compartidos en el servidor. | | sudo tail -f /var/log/samba/log.smbd | Muestra los registros de Samba en tiempo real. | **Posibles Problemas y Soluciones** | **Problema** | **Causa Posible** | **Solución** | | --- | --- | --- | | No se puede acceder al recurso compartido | El usuario no tiene permisos o la configuración es incorrecta | Verifica el archivo smb.conf, asegúrate de que valid users incluya el usuario. | | Failed to restart smbd.service: Unit not found | Samba no está instalado o no está en ejecución | Reinstala Samba con sudo apt install samba y verifica el servicio con sudo systemctl status smbd. | | Permiso denegado al acceder a una carpeta | Permisos de archivos incorrectos | Asegúrate de que la carpeta tenga permisos correctos: sudo chmod 2770 /ruta/carpeta. | | E: No se pudo abrir el fichero de bloqueo | Ejecución sin permisos de superusuario | Usa sudo antes de los comandos para permisos elevados. | | Samba no aparece en la red local | Firewall bloqueando el tráfico | Abre el puerto en el firewall con sudo ufw allow samba. | | Pérdida de paquetes en ping a la IP de la VM | Configuración de red inestable | Reinicia la red de solo anfitrión en VirtualBox y verifica el modo promiscuo en la VM. | **Consejos y Buenas Prácticas** 1. **Realizar una copia de seguridad** del archivo smb.conf antes de hacer cambios. 2. Usar `testparm` después de editar smb.conf para verificar errores de configuración. 3. Mantener el servicio Samba actualizado con los últimos parches de seguridad. 4. Configurar la red en modo “Solo Anfitrión” para evitar conflictos de red, en la maquina virtual. 5. Consultar los registros en /var/log/samba si tienes problemas de acceso o permisos.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully