Skip to content

farazshaikh/LikewiseSMB2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project resurrects the Likewise opensource SMB2 file server effort.

The base version on the Likewise code base comes from the last know stable open-source revision "likewise-open-6.1.0.406". (downloadable from ubuntu)
"likewise-open-6.1.0.406" had the SMB2 versions stripped out. The SMB2 server is reinstated by forward porting it from "likewise-open-6.0.0.53010".

-End result is that likewise-open-6.1.0.406 can be compiled to deliver a fully functional AD integrated SMB2 server.
-SMB2 redirector functionality is also present.
-Share mgmt via wksvc and srvsvc

Likewise code is neatly written be very hackable. So please contribute mainly to make this complaint towards SMB3












LikeWise CIFS Server Cheat Sheet
---------------------------------

sudo apt-get install build-essential fakeroot devscripts debhelper autoconf automake libtool libncurses5-dev uuid-dev flex bison libpam0g-dev libssl-dev libxml2-dev libpopt-dev
sudo apt-get install libglade2-dev libsqlite3-dev libkrb5-dev libldap2-dev libtdb-dev libcurl4-openssl-dev libsasl2-dev
sudo apt-get install libpam-dev
sudo apt-get install libpam-dev:i386
sudo apt-get install build-essential:native


-> Compiling.
   mkdir debug
   cd debug
   ../configure --debug; make -j32 package; make -j32 lwtools

-> Installing.
   dpkg --install ./debug/package/deb/likewise-open/likewise-open_6.1.0-0_amd64.deb


-> Joining AD (Optional)
   sudo apt-get purge avahi (interferes with .local addresses)
   On2012
   Enable AD role
   Enable DNS Server role

   edit /etc/resolv.conf
   to point only to the AD/DNS 2012 server

   Following should work now
   # nslookup domainname
   # ping domainaname

   add the hostname AD hostname example WIN-JDHHBTAP2TR.likewise.local
   to /etc/hosts

   Sample /etc/hosts
   10.64.4.181 dc.domain.local
   10.64.4.181 dc
   10.64.4.181 domain.local
   10.64.4.181 domain
   127.0.0.1 localhost

   Sample resolv.conf
   search eng.yourcorp.com
   #nameserver 10.64.1.100
   #search likewise.local
   nameserver 10.64.4.181

   sudo ./debug/stage/opt/likewise/bin/domainjoin-cli join ADLAB1.local Administrator PASSWORD
   sudo ./debug/stage/opt/likewise/bin/domainjoin-cli  leave
   sudo ./debug/stage/opt/likewise/bin/lw-set-default-domain ADLAB1.local

-> Enabling Local User
   sudo ./debug/stage/opt/likewise/bin/lw-lsa mod-user --enable-user Administrator
   sudo  ./debug/stage/opt/likewise/bin/lw-lsa  mod-user --set-password PASSWORD Administrator

-> Creating a Share
   mkdir /lwcifs
   chmod 0777 /lwcifs
   sudo ./debug/stage/opt/likewise/sbin/lwnet share add cifs2=c:\\lwcifs
   sudo ./debug/stage/opt/likewise/sbin/lwnet share set-info cifs2 --allow Everyone
   ./debug/stage/opt/likewise/sbin/lwnet share
     Share name  Resource   Remark
   ------------------------------------------
     cifs2       C:\wcifs
     C$          C:\lwcifs  Default Share
     IPC$        C:\        Remote IPC


-> Registry entries
   set_value [HKEY_THIS_MACHINE\Services\lwio\Parameters\Drivers\srv] EnableSecuritySignatures 0
   set_value [HKEY_THIS_MACHINE\Services\lwio\Parameters\Drivers\srv] RequireSecuritySignatures 0
   set_value [HKEY_THIS_MACHINE\Services\lwio\Parameters\Drivers\srv] SupportSmb2 1
   add_value [HKEY_THIS_MACHINE\Services\srvsvc] Autostart reg_dword 1


-> Check if everything is operational
   sudo ./debug/stage/opt/likewise/bin/lwsm list
   lwreg       running (standalone: 14487)
   dcerpc      running (standalone: 14537)
   eventlog    running (standalone: 14546)
   lsass       running (standalone: 14625)
   lwio        running (standalone: 14583)
   netlogon    running (standalone: 14569)
   npfs        running (io: 14583)
   pvfs        running (io: 14583)
   rdr         running (io: 14583)
   srv         running (io: 14583)
   srvsvc      running (standalone: 14717)


   sudo gdb --args ./debug/stage/opt/likewise/bin/test_load --threads 1 --connections 1 --user Administrator --password PASSWORD --domain FRZ-DEV 10.64.1.134 cifs2
   sudo mount -t cifs //10.64.1.134/cifs2  /tmp/mount -o user=Administrator,domain=FRZ-DEV,password=PASSWORD


-> Editing and playing with registry (Services Wont start automatically)
./object/package/open/.deb-likewise-open/build/debian/likewise-open/opt/likewise/bin/lwregshell
./object/package/open/.deb-likewise-open/build/debian/likewise-open/opt/likewise/bin/lwregshell upgrade /opt/likewise/share/config/lwiod.reg
   \> set_value [HKEY_THIS_MACHINE\Services\lwio\Parameters\Drivers\srv] SupportSmb2 1
   sudo  ../lwreg/shell/.libs/lwregshell import ./etc/lwiod.reg

-> WireShark Traces
   ip.src == 10.65.1.134 && smb and not tcp.analysis.duplicate_ack and not tcp.analysis.retransmission


->Authentication Debugging Local Provider:
  /likewise-open-6.0.0.53010/lsass/server/auth-providers/local-provider/lpuser.c
  /likewise-open-6.0.0.53010/lsass/server/ntlm/

-> Misc Command
  ./debug/stage/opt/likewise/bin/lwio-cli --get-stats
  ./lwio/tests/test_pvfs/test_pvfs --ls-open-files 100

-> Debug logs
  sudo tail -F /var/log/syslog

About

The Likewise SMB2/3 stack !

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published