Imprimir
Categoria: Linux
Acessos: 4925

 #apt-get install samba samba-client

 Now it will ask you some basic question about the samba configuration like

 workgroup or domain name you want,other questions enter the correct information which one suits for your need.

Preparing directories and users

 Create directories for Samba to use with Windows

 #mkdir samba

 Now we need to create users to access this directiory

 #useradd ruchi

 Now create a password for this user

 #smbpasswd -a ruchi

configure samba configuration file 

 Samba configuration file located at  /etc/samba/smb.conf

 In this file main section is Global where you can define all parameters and the example as follows

 [global]

 workgroup = debian
 netbios name = debianserver
 server string = %h server (Samba %v)
 log file = /var/log/samba/log.%m
 max log size = 1000
 syslog = 0

 Now you need to configure the share directory(ex:-samba) for users below is the example.

 [SAMBA]

 path=/samba
 browseable=yes
 writeable=yes
 valid users = ruchi
 admin users = debain

 If you want to check your configuration file is correct you need to run the following command

 #testparm

 Now you need to restart the samba to take the new changes effect

 #/etc/init.d/samba restart

 If you want more configuration option check  man page of smb.conf

Testing your samba configuration

 You want to test your samba configuration for users ruchi run the following command

 #smbclient -L //debianserver -U ruchi

Configuring the Windows workstation

 authenticate each workstation

 logon to the Windows workstation as any user with administrative priviliges

 [Windows 2000] Start -> Settings -> Control Panel -> System -> Network Identification -> Properties -> Member of -> Domain -> type the domain name as specified in the \'workgroup\' section of smb.conf -> ok

 enter the root username and password for the Samba file server

 if you simply wish to transfer existing users from a workstation, then if a user exists on the Samba file server and on the workstation, at this point you could log them into the Samba file server and their profile from the workstation would be copied to the Samba file server when they log out