Pre-reqs: Likewise has been installed and the system already joined to your Active Directory Domain. See Mr. Penn's great post about this:
Next, we need to install Samba on the Linux system:
su
aptitude install samba winbind
Create a directory named 'idmap' under /usr/lib/samba. Create a symbolic link from /usr/lib/samba/idmap/lwicompat_v2.so to /usr/centeris/lib/idmap/lwicompat_v2.so. Do this for version 4 as well:
su
cd /usr/lib/samba
mkdir idmap
cd idmap
ln -s /usr/centeris/lib/idmap/lwicompat_v2.so
ln -s /usr/centeris/lib/idmap/lwicompat_v4.so
Next, confirm the version of Samba you have installed. I have Ubuntu Hardy Heron 8.04 and my version is Version 3.0.28a
smbd -V
Version 3.0.28a
Now we have to edit the Samba configuration file to set the following parameters. If the parameters are not included, add them.
security = ads
workgroup = enter workgroup from /etc/samba/lwiauthd.conf here
realm = enter realm from /etc/samba/lwiauthd.conf here
# use lwicompat_v2 for Samba 3.0.0 to 3.0.24
# idmap backend = lwicompat_v2
#
# use lwicompat_v4 for Samba 3.0.25 and later
idmap backend = lwicompat_v4
idmap uid = 50-9999999999
idmap gid = 50-9999999999
Create a userPrincipalName value for the machine in it's Active Directory account object using the command lwinet:
lwinet ads setmachineupn -U Administrator
should get:
Added userPrincipalName value of host/SAMBA@YOURDOMAIN.LOCAL
On the likewise site I found this special note:
Special note for Ubuntu and Debian only: Ubuntu and Debian store
secrets.tdb in /var/lib/samba so you will need to create a symlink back
to /etc/samba/secrets.tdb.
$ mv /var/lib/samba/secrets.tdb /var/lib/samba/secrets.tdb.orig
$ ln –s /etc/samba/secrets.tdb /var/lib/samba/secrets.tdb
To verify:
Start the Samba winbind daemon winbindd
/etc/init.d/winbind start
Use the wbinfo tool to verify various pieces of information. Start by
ensuring that winbindd is honoring the machine trust account
settings:
$ wbinfo -t
checking the trust secret via RPC calls succeeded
Next resolve a name to a SID and that SID to a uid
$ wbinfo -n "DOMAIN\user"
S-1-5-21-1866663475-11234234241-1563435624-1103 User (1)
$ wbinfo -S S-1-5-21-1862675975-116998903123-1366135624-1103
200000
This should match the information returned from getent which is
sent through Likewise Authentication daemon:
$ getent passwd "HCHB\cplunkett"
DOMAIN\
Next, start up Samba and after you have shared out a folder, try to access a share from smbclient or
a Windows client.
/etc/init.d/samba start
Go to a Windows machine:
\\{name of your linux server}\{name of share}
example: \\samba\test
You can verify the connected user’s using the smbstatus command.
$ smbstatus
Finally, see Mr. Penn's post on how to set up shares
View comments