LTSP with Samba
Server Training - Linux Terminal Server

Samba is a service that allows your Ubuntu LTSP Server to share directories or file systems with  Windows computers.  Creating a versatile network combining LTSP for Linux machines and Samba for Windows machines has several advantages.

1. Users Login with LTSP or Samba
On a network where you have both Linux Terminal Service  for diskless computers running and Windows boxes that use Samba it allows users to login from either and still be in the same home directory.  This allows users to roam to any machine in a large network.
2. Leverage Your Server
Using both LTSP and Samba on the same box provides a way to leverage the costs and use one server for all users in different situations.  The server that you build for LTSP will easily also support Samba.

 

Related Links
LTSP Set Up on Ubuntu 8.10
LTSP Client
Managing Users in LTSP
Samba with LTSP on Ubuntu 8.10
Troubleshooting LTSP
UFW Firewall for LTSP

Install Samba on Ubuntu 8.10

sudo apt-get install samba

Edit your /etc/samba/smb.conf file.

This file maps the account names in Linux to what their equivalent names would be in Windows.  You will be able to access the same home folder from either.  Be sure to make the workgroup the same as the workgroup on each of your Windows machines.  Edit the hosts allow and put your network in to enhance the security somewhat.  This is a very basic smb.conf but it will get you started.

[global]

workgroup = WORKGROUP
netbios name = UB
server string = Samba Server
interfaces = eth0 lo
hosts allow = 192.168.0 127.0.0.1
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
log file = /var/log/samba/%m.log
max log size = 50
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
security = user
passdb backend = smbpasswd
passdb expand explicit = No
create mask = 0644
directory mask = 0755
username map = /etc/samba/smbusers

[homes]

comment = Home Directory
read only = No
browseable = No
valid users = %S

This setup allows users to login with Samba to the same home directory that they have access to using LTSP.  Users will only be allowed to connect to their own home folders and not be able to view the home folders of other users for security.

 

Test your set up with:

sudo testparm


Fix any problems that are shown and then restart your samba server with:

sudo /etc/init.d/samba restart

 

This scenario assumes that you have created the users in Linux so they are already able to access their files using LTSP and now you want to enable them to login with Samba from a Windows machine.   Once the users are created in Linux you will need to give them a Samba account:

smbpasswd -a john


When you hit "Enter", you'll be asked to enter a password. The "-a" in this command means "to add".  Note you must add each user to smbpasswd with the command above or your Windows users will not be able to login.

 

 


Copyright CyberMontana Inc. and BeginLinux.com
All rights reserved. Cannot be reproduced without written permission. Box 1262 Trout Creek, MT 59874