Utilizamos cookies propias y de terceros. [Más información sobre las cookies].
Política de cookies
Proyecto AjpdSoft

· Inicio
· Buscar
· Contactar
· Cookies
· Descargas
· Foros
· Historia
· Nosotros
· Temas
· Top 10
· Trucos
· Tutoriales
· Wiki

Redes: Instalar Samba y Swat, compartir carpeta en Linux Ubuntu
Linux


Os explicamos cómo instalar y configurar Samba (mediante SMB permite compartir archivos e impresoras en Linux para acceso desde Windows) y Swat (herramienta de administración Web de Samba) en Linux Ubuntu. Os explicamos cómo compartir una carpeta en Linux para que sea accesible desde Windows.



Instalación y configuración de Samba y Swat en Linux Ubuntu

INSTALACIÓN Y CONFIGURACIÓN DE SAMBA Y SWAT EN LINUX UBUNTU 6.10

Samba es una aplicación Unix/linux que, mediante el protocolo SMB (Server Message Block), permite los siguientes servicios en un PC con Unix/Linux:

  • Compartir uno o más sistemas de archivos.
  • Compartir impresoras, instaladas tanto en el servidor como en los clientes.
  • Ayudar a los clientes, con visualizador de Clientes de Red.
  • Autentificar clientes logeándose contra un dominio Windows.
  • Proporcionar o asistir con un servidor de resolución de nombres WINS.

De esta forma, un equipo Linux con Samba instalado y configurado podrá pasar como si de un equipo Windows se tratara (en cuanto a recursos compartidos). Se podrá acceder desde un equipo Windows a las carpetas/impresoras compartidas en un equipo Linux con Samba como si de dos equipos Windows se tratara. De esta forma no será necesario transferir ficheros mediante ftp u otros métodos más pesado, será suficiente con acceder a "Mis sitios de red" y buscar el equipo Linux.

En primer lugar deberemos instalar Samba y Swat en Linux, pues normalmente no vienen instalados por defecto. Para instalarlo (en el caso de distribuciones Debian, en concreto Ubuntu) abriremos una ventana de Terminal, desde "Aplicaciones" - "Accesorios" - "Terminal". En esta ventana escribiremos:

sudo apt-get install inetd samba samba-common smbclient swat

Nota 1: colocando "sudo" delante del comando "apt-get" no será necesario iniciar sesión con superusuario root, puede que nos pida la contraseña del usuario root para ejecutar el comando apt-get.

Nota 2: si no encuentra alguno de los paquetes a instalar será necesario añadir el repositorio correspondiente en el fichero /etc/apt/sources.list, puede ver el contenido de este fichero pulsando aquí. Si el contenido no es el mismo puede hacer una copia del actual y reemplazarlo con el que le mostramos abajo, después es conveniente actualizar la caché para poder instalar Samba. Para actualizar la caché pondremos:

apt-get update

Puede ver el resultado del comando pulsando aquí.

Una vez instalado Samba y Swat, podremos visualizar el archivo de configuración de Samba con el comando:

cat /etc/samba/smb.conf

Puede ver el contenido del fichero smb.conf original pulsando aquí.

A continuación crearemos un usuario para Samba mediante el comando:

smbpasswd -a nombreusuario

nos pedirá la contraseña y reintroducirla:

New SMB password:
Retype new SMB password:

Es conveniente reiniciar el equipo, aunque a veces funciona sin hacerlo. Llegados a este punto accederemos a la administración Web de Samba (Swat), para ello abriremos Firefox (navegador Web) y escribiremos en el campo de dirección:

http://localhost:901

nos pedirá usuario y contraseña, para poder configurar Samba de forma completa deberemos acceder con el superusuario root:

Acceso a Swat (usuario y contraseña)

La ventana inicial de Swat tiene este aspecto:

Swat Samba vía Web

Cabe mencionar que Swat es accesible desde cualquier PC de la red con Windows o Linux, introduciendo la IP del equipo Linux o el nombre de red (si ya hemos configurado Samba) con Samba en Internet Explorer (o el navegador de Internet que utilicemos):

Acceso a Swat (usuario y contraseña) desde Windows

Desde esta ventana podremos compartir carpetas de Linux para que estén visibles en la red de Windows, compartir impresoras, administrar usuarios, etc. Todo ello de forma relativamente sencilla.

En primer lugar indicaremos el grupo de trabajo, el nombre NetBios del equipo en la red, etc. Para ello pulsaremos en el icono "Globals":

Globals

Indicaremos el grupo de trabajo en "Workgroup", el nombre de red en "netbios name" y otras opciones. Una vez modificadas pulsaremos "Commit Change" para guardar y aplicar los cambios:

Configuración Global Samba

 

Pulsando el icono "Status" Acceso a estado del servidor Samba podremos ver los usuarios conectados, los usuarios denegados, cerrar conexión de usuarios, etc:

Server Status Samba

 

Os explicaremos a continuación cómo compartir una carpeta con Swat. Para ello accederemos a la administración web de Samba (Swat) tal y como hemos indicado anteriormente, pulsaremos en el icono "Shares":

Shares

para compartir una carpeta existente en Linux pulsaremos en el cuadro de textoque aparece a la derecha de "Create Share" e introduciremos el nombre que tendrá el recurso compartido, en nuestro caso "compartida_linux", pulsaremos en "Create Share" para mostrar las opciones de configuración del nuevo recurso compartido:

Shares Parameters

El dato obligario para compartir una carpeta es "path" (la ruta de la carpeta existente en linux que queramos compartir, en nuestro caso /home/alonso/Desktop/compartida):

Configuración carpeta compartida

Pero, por supuesto, también podremos indicar un comentario aclaratorio en "comment", si se permitirá modificación de los datos de la carpeta "read only", podremos indicar también los equipos de la red a los que permitiremos el acceso en "hosts allow", los equipos a los que les denegaremos el acceso "hosts deny", también podremos indicar si queremos activar los log (auditoria de acceso) para esta carpeta en "EventLog Options" - "available" y otras muchas opciones. Podremos mostrar las opciones avanzadas pulsando en el botón "Avanced" de la parte superior de la ventana "Share Parameters". Tras introducir las opciones de la carpeta compartida pulsaremos el botón "Commit Changes" para guardar y aplicar los cambios.

Si desea ver el contenido del fichero smb.conf después de aplicar los cambios (de crear una carpeta compartida) pulse aquí.

Para probar el acceso a la carpeta compartida desde un equipo con Windows XP, accederemos a "Mis sitios de red" - "Toda la red" - "Red de Microsoft Windows" y haremos doble clic sobre el grupo de trabajo al que pertenezca el equipo de Linux:

Acceso recurso compartido desde Windows a Linux

dentro de este grupo nos aparecerá nuestro equipo Linux (en nuestro caso "pclinux server (Samba, Ubuntu) (pclinux)"):

Acceso recurso compartido desde Windows a Linux

Haciendo doble clic sobre este equipo nos aparecerán las carpetas e impresoras compartidas de Linux. También es perfectamente accesible introduciendo el nombre del equipo linux en "Inicio" - "Ejecutar" de la siguiente forma:

\nombre_equipo_linux

Acceso recurso compartido desde Windows a Linux

Lógicamente, dentro de "compartida_linux" podremos ver los ficheros que hayamos copiado en Linux, en la carpeta:

/home/alonso/Desktop/compartida

por supuesto, podremos trabajar en esta carpeta como si de una carpeta Windows se tratara, podremos copiar, pegar, eliminar, modificar los ficheros existentes en ella (según los permisos que le hayamos dado):

Acceso recurso compartido desde Windows a Linux

 

 

 

 

ANEXO

* Contenido del fichero /etc/apt/sources.list:

deb http://es.archive.ubuntu.com/ubuntu/ edgy main restricted
deb-src http://es.archive.ubuntu.com/ubuntu/ edgy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://es.archive.ubuntu.com/ubuntu/ edgy-updates main restricted
deb-src http://es.archive.ubuntu.com/ubuntu/ edgy-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://es.archive.ubuntu.com/ubuntu/ edgy universe
# deb-src http://es.archive.ubuntu.com/ubuntu/ edgy universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://es.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
# deb-src http://es.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu edgy-security main restricted
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted
# deb http://security.ubuntu.com/ubuntu edgy-security universe
# deb-src http://security.ubuntu.com/ubuntu edgy-security universe
deb http://www.getautomatix.com/apt edgy main

#AUTOMATIX REPOS START

deb http://archive.canonical.com/ubuntu edgy-commercial main

deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy-updates universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy universe multiverse
#AUTOMATIX REPOS END
deb http://nvidia.limitless.lupine.me.uk/ubuntu edgy stable
deb http://ubuntu.beryl-project.org/ edgy main
alonso@pclinux:~$ pwd
/home/alonso
alonso@pclinux:~$ cat /etc/apt/sources.list

deb http://es.archive.ubuntu.com/ubuntu/ edgy main restricted
deb-src http://es.archive.ubuntu.com/ubuntu/ edgy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://es.archive.ubuntu.com/ubuntu/ edgy-updates main restricted
deb-src http://es.archive.ubuntu.com/ubuntu/ edgy-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://es.archive.ubuntu.com/ubuntu/ edgy universe
# deb-src http://es.archive.ubuntu.com/ubuntu/ edgy universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://es.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
# deb-src http://es.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu edgy-security main restricted
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted
# deb http://security.ubuntu.com/ubuntu edgy-security universe
# deb-src http://security.ubuntu.com/ubuntu edgy-security universe
deb http://www.getautomatix.com/apt edgy main

#AUTOMATIX REPOS START

deb http://archive.canonical.com/ubuntu edgy-commercial main

deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy-updates universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy universe multiverse
#AUTOMATIX REPOS END
deb http://nvidia.limitless.lupine.me.uk/ubuntu edgy stable
deb http://ubuntu.beryl-project.org/ edgy main
alonso@pclinux:~$ clear~
bash: clear~: orden no encontrada
alonso@pclinux:~$ clear

alonso@pclinux:~$ cat /etc/apt/sources.list

deb http://es.archive.ubuntu.com/ubuntu/ edgy main restricted
deb-src http://es.archive.ubuntu.com/ubuntu/ edgy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://es.archive.ubuntu.com/ubuntu/ edgy-updates main restricted
deb-src http://es.archive.ubuntu.com/ubuntu/ edgy-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://es.archive.ubuntu.com/ubuntu/ edgy universe
# deb-src http://es.archive.ubuntu.com/ubuntu/ edgy universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://es.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
# deb-src http://es.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu edgy-security main restricted
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted
# deb http://security.ubuntu.com/ubuntu edgy-security universe
# deb-src http://security.ubuntu.com/ubuntu edgy-security universe
deb http://www.getautomatix.com/apt edgy main

#AUTOMATIX REPOS START

deb http://archive.canonical.com/ubuntu edgy-commercial main

deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy-updates universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu edgy universe multiverse
#AUTOMATIX REPOS END
deb http://nvidia.limitless.lupine.me.uk/ubuntu edgy stable
deb http://ubuntu.beryl-project.org/ edgy main

* Resultado comando sudo apt-get install inetd samba samba-common smbclient swat:

Leyendo lista de paquetes... Hecho
Creando Árbol de dependencias
Leyendo información de estado... Hecho
Nota, seleccionando inetutils-inetd en lugar de inetd
Paquetes sugeridos:
smbfs
Paquetes recomendados
smbldap-tools
Se instalarán los siguientes paquetes NUEVOS:
inetutils-inetd samba samba-common smbclient swat
0 actualizados, 5 se instalarán, 0 para eliminar y 0 no actualizados.
Se necesita descargar 0B/9610kB de archivos.
Se utilizarán 24,2MB de espacio de disco adicional después de desempaquetar.
Preconfigurando paquetes ...
Seleccionando el paquete inetutils-inetd previamente no seleccionado.
(Leyendo la base de datos ...
119986 ficheros y directorios instalados actualmente.)
Desempaquetando inetutils-inetd (de .../inetutils-inetd_2%3a1.4.3+20051212-4_i386.deb) ...
Seleccionando el paquete samba-common previamente no seleccionado.
Desempaquetando samba-common (de .../samba-common_3.0.22-1ubuntu4.1_i386.deb) ...
Seleccionando el paquete samba previamente no seleccionado.
Desempaquetando samba (de .../samba_3.0.22-1ubuntu4.1_i386.deb) ...
Seleccionando el paquete smbclient previamente no seleccionado.
Desempaquetando smbclient (de .../smbclient_3.0.22-1ubuntu4.1_i386.deb) ...
Seleccionando el paquete swat previamente no seleccionado.
Desempaquetando swat (de .../swat_3.0.22-1ubuntu4.1_i386.deb) ...
Configurando inetutils-inetd (1.4.3+20051212-4) ...
* Starting internet superserver inetd [ ok ]

Configurando samba-common (3.0.22-1ubuntu4.1) ...

Configurando samba (3.0.22-1ubuntu4.1) ...
* Starting Samba daemons... [ ok ]

Configurando smbclient (3.0.22-1ubuntu4.1) ...
Configurando swat (3.0.22-1ubuntu4.1) ...

* Contenido del fichero smb.conf:

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
#

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = MSHOME

# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
; wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
; bind interfaces only = true

 

#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
; syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d

####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
; security = user

# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam

obey pam restrictions = yes

; guest account = nobody
invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
; unix password sync = no

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *EntersnewsUNIXspassword:* %n *RetypesnewsUNIXspassword:* %n *passwordsupdatedssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
; domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
; logon path = \%Nprofiles\%U
# Another common choice is storing the profile in the user's home directory
; logon path = \%N\%Uprofile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
; logon drive = H:
; logon home = \%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
; logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe. The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap

# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups

# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
; printer admin = @lpadmin

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
; domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \serverusername
;[homes]
; comment = Home Directories
; browseable = no

# By default, \serverusername shares can be connected to by anyone
# with access to the samba server. Un-comment the following parameter
# to make sure that only "username" can connect to \serverusername
; valid users = %S

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
; writable = no

# File creation mask is set to 0600 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0664.
; create mask = 0600

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
; directory mask = 0700

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = no
writable = no
create mode = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
; write list = root, @ntadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes

# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom

* Contenido del fichero de configuración de samba smb.conf después de compartir algunas carpetas:

# Samba config file created using SWAT
# from 0.0.0.0 (0.0.0.0)
# Date: 2007/03/19 21:59:10

[global]
workgroup = GRUPO
server string = %h server (Samba, Ubuntu)
obey pam restrictions = Yes
passdb backend = tdbsam
passwd program = /usr/bin/passwd %u
passwd chat = *EntersnewsUNIXspassword:* %n *RetypesnewsUNIXspassword:* %n *passwordsupdatedssuccessfully* .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
panic action = /usr/share/samba/panic-action %d
invalid users = root

[printers]
comment = All Printers
path = /tmp
create mask = 0700
printable = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

[compartida_linux]
comment = carpeta compartida en linux
path = /home/alonso/Desktop/compartida
read only = No

 

 

* Versión de Samba instalada (obtenida con el comando aptitude show samba):


Paquete: samba
Estado: instalado
Instalado automáticamente: no
Versión: 3.0.22-1ubuntu4.1
Prioridad: opcional
Sección: net
Desarrollador: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Tamaño sin comprimir: 7569k
Depende de: samba-common (= 3.0.22-1ubuntu4.1), netbase, logrotate, libacl1 (>= 2.2.11-1), libattr1 (>= 2.4.4-1), libc6 (>=
2.4-1), libcomerr2 (>= 1.33-3), libcupsys2 (>= 1.2.3), libgnutls13 (>= 1.4.0-0), libkrb53 (>= 1.4.2), libldap2
(>= 2.1.17-1), libpam0g (>= 0.76), libpopt0 (>= 1.10), zlib1g (>= 1:1.2.1), debconf (>= 0.5) | debconf-2.0,
libpam-runtime (>= 0.76-13.1), libpam-modules, lsb-base (>= 3.0-6)
Recomienda: smbldap-tools
Remplaza: samba-common (<= 2.0.5a-2)
Descripción: a LanManager-like file and printer server for Unix
The Samba software suite is a collection of programs that implements the SMB/CIFS protocol for unix systems, allowing you to
serve files and printers to Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred to as the LanManager
or NetBIOS protocol.

This package contains all the components necessary to turn your Debian GNU/Linux box into a powerful file and printer
server.

Currently, the Samba Debian packages consist of the following:

samba - LanManager-like file and printer server for Unix.
samba-common - Samba common files used by both the server and the client.
smbclient - LanManager-like simple client for Unix.
swat - Samba Web Administration Tool
samba-doc - Samba documentation.
samba-doc-pdf - Samba documentation in PDF format.
smbfs - Mount and umount commands for the smbfs (kernels 2.2.x and above).
libpam-smbpass - pluggable authentication module for SMB/CIFS password database
libsmbclient - Shared library that allows applications to talk to SMB/CIFS servers
libsmbclient-dev - libsmbclient shared libraries
winbind: Service to resolve user and group information from Windows NT servers
python2.4-samba: Python bindings that allow access to various aspects of Samba

It is possible to install a subset of these packages depending on your particular needs. For example, to access other
SMB/CIFS servers you should only need the smbclient and samba-common packages.

http://www.samba.org/



Nota: Para este artículo hemos empleado:

* Linux Ubuntu 6.10.
* Windows XP.
* Samba 3.0.22

Anuncios


Enviado el Lunes, 19 marzo a las 17:26:59 por ajpdsoft
Visita nuestro nuevo sitio web con programas y contenidos actualizados: Proyecto A