Pages

Scenario2 workgroup model, shares on linux machine

Scenario2 (workgroup model, shares on linux machine):
SAMBA server will be configured on our machine
mainserver.mydomain.com. The workgroup name can be same as the one


already being used in the current windows setup. However, we will create a new
workgroup named SAMBAWORKGROUP and configure the windows clients to be a
part of this workgroup.
Server side configuration:
1) Modify the /etc/samba/smb.conf file and give the following entries:
[root@mainserver /]# vi /etc/samba/smb.conf
[global]
workgroup = SAMBAWORKGROUP
comment = samba server on the local lan placed in the server room
hosts allow = 192.168.1. 192.168.2. 127.
security = user
load printers = yes
os level = 64
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
preferred master = yes
domain master = yes
wins support = yes
[cdrom]
comment = CDROM on SAMBA server
path = /mnt/cdrom
read only = yes
browseable = yes
public = yes
[floppy]
comment = Floppy drive on SAMBA server
path = /mnt/floppy
read only = no
browseable = yes
valid users = @students ; note that the group students exists in /etc/groups
[linuxproject]
comment = project on linux by MS 4 students
path = /users/ms4/linuxproject
read only = no
browseable = yes
valid users = nayyar, inam
Note: All paths defined in the smb.conf file must exist. If they don’t create them
yourself.
2) Test your smb.conf file by running testparm command which is only
available for SAMBA. This command should show all the shares without any errors.
[root@mainserver /]# testparm less
3) If the above command works fine then run the smb services now by:


[root@mainserver /]# /etc/rc.d/init.d/smb start
4) Create users inam and nayyar ( on the local linux machine, if not already created )
and generate SMB passwords for them which will be used to access the shares
defined on this computer from the windows client. Use the following commands to
generate SMB passwords:
[root@mainserver /]# cat /etc/passwd mksmbpasswd.sh > /etc/samba/smbpasswd
[root@mainserver /]# smbpasswd -a inam
[root@mainserver /]# smbpasswd -a nayyar
Note: The first command in step 4 needs to be given once.


Client side configuration:
On the client side, i.e. on the computer having Microsoft Windows, open the network
neighborhood properties, and in the identification tab, type in SAMBAWORKGROUP in
the workgroup text box. Also set the other network related properties, e.g. IP
addresses, address of DNS and name of Primary WINS server which is the IP
address of SAMBA server. Press OK and restart the windows machine. Once
restarted, type in user name inam and his password. You will be logged on. Now
you should be able to see the SAMBA server in the Network Neighborhood window.
Double click it, and you should be able to see the shares: inam, cdrom,
floppy and linuxproject. If you did not log in as a regular linux user, then on
double clicking on the SAMBA server will give you a login screen, here again you
have a chance to provide a regular linux user account and it's samba password. If still
you do not supply a regular login and you just press OK, then you will be presented
with the shares on the server without the share inam displayed. In fact you will be
logged in as user nobody , and this will be a lot restrictive access than assumed.
To assign a drive letter to a share, you can either right click on the share and select
Map network drive. Or you can use the command on the windows DOS shell
prompt:
C:\> net use F: \\mainserver.mydomain.com\cdrom

Forex Trading