SMB Troubleshooting


According to the forums, problems with the SMB share seem to be one of the most frequent issues.  This article will help you work through those issues.  It is written specifically for Windows installations, with the share being located on the CloneDeploy server, but the concepts can be applied to any OS or remote share.

Typically when installing CloneDeploy using the automated Windows installer, all components are setup and ready to go out of the box.  For a small percentage of users the SMB share does not get created properly.  I am still unsure why this only effects certain users.  CloneDeploy uses a standard share for uploading and deploying images, it requires that all client computers connect directly to the share.  The CloneDeploy Server must also have access to either the share’s physical path on the local server or the UNC path if a remote share.

The following commands are run from an elevated cmd prompt on the CloneDeploy Server.
All instances of program files(x86) should be replaced with program files if you installed on a 32 bit machine.

1. Verify The Share Users Exist

net user

In your list of users you should see cd_share_rw and cd_share_ro
Resolution: Remediation steps A+C+D

2. Verify The Share Exists

net share

You should see a share with the name cd_share and a Resource(path) of c:\program files (x86)\clonedeploy\cd_dp

Resolution: Remediation steps C+D

3. Verify The Share Permissions

net share cd_share

You should see the cd_share_ro user with READ permission and the cd_share_rw user with FULL permission

Resolution: Remediation steps B+C+D

4. Verify The Security (NTFS) Permissions

icacls "c:\program files (x86)\clonedeploy\cd_dp"

You should see:

IIS_IUSRS user with (OI)(CI)(M) permissions
cd_share_rw user with (OI)(CI)(F) permissions
cd_share_ro user with (OI)(CI)(RX) permissions

icaclsResolution: Remediation step D

If the previous 4 commands show the appropriate output, then the SMB share is configured properly.  Time to test.

5. Verify IIS Can Create Image Folders

  • Login to the CloneDeploy Web Interface
  • Select Images
  • Select New
  • Enter TestImage for the name
  • Click Add
  • Open File Explorer
  • Navigate to c:\program files (x86)\clonedeploy\cd_dp\images
  • Verify the TestImage folder was created

Resolution: Verify Step 4. Verify the distribution point physical path is correct.

6. Verify Client Computers Can Connect To The Share

  • Boot the computer you wish to upload using either the PXE or ISO boot method
  • Select Client Console from the boot menu
  • Login when prompted
  • Enter the following commands
mkdir /storage

In the following command replace [server-ip] with the CloneDeploy Server IP. Replace [cd_share_rw pass] with the password for the cd_share_rw user

mount -t cifs //[server-ip]/cd_share /storage -o user=cd_share_rw,pass=[cd_share_rw pass],dom=workgroup,vers=2.0
cd /storage/images

You should now see the TestImage folder that was created in Step 5
Now verify the cd_share_rw user can write to the share

mkdir write-test

You should see the write-test folder

rm -rf write-test

Resolution: Verify Steps 1-4.  Verify the correct password is being used.  Verify no firewalls are blocking access.  Try connecting to the share from a Windows machine.

7. Verify Distribution Point

If this step passes and you still receive an SMB error when trying to upload an image, then there is configuration problem with your Distribution Point.

  • Login to the CloneDeploy Web Interface
  • Select Admin->Distribution Points
  • Select view on the default Distribution Point
  • Verify all fields are correct
  • Update the password fields if necessary, these are always blank, this is normal
  • Verify the passwords for the cd_share_ro and cd_share_rw users do not contain & $ < > ? ” ‘
    If so, change the passwords for the users on the Server OS and Distribution Point


Remediation Steps

If preferred, the following steps can be achieved through a GUI instead of the cmd line.

A. Create Users

In the following commands replace [password] with a password of your choosing remembering not to use & $ < > ? ” ‘

net user cd_share_ro [password] /add
net user cd_share_rw [password] /add
WMIC USERACCOUNT WHERE Name="cd_share_ro" SET PasswordExpires=FALSE
WMIC USERACCOUNT WHERE Name="cd_share_rw" SET PasswordExpires=FALSE

B. Delete Share

net share cd_share /delete

C. Create Share

net share "cd_share=c:\program files (x86)\clonedeploy\cd_dp" /grant:cd_share_ro,READ /grant:cd_share_rw,FULL"

D. Set Permissions

icacls "c:\program files (x86)\clonedeploy\cd_dp" /T /C /grant cd_share_ro:(OI)(CI)RX /grant cd_share_rw:(OI)(CI)F /grant IIS_IUSRS:(OI)(CI)M

in Troubleshooting
Comments are closed.