Shared Folder access for non domain access

Hello Forum,

I have a shared folder where I need to grant access to a non domain computer (not attached to my Nethserver Domain). I’ve allowed Everyone Read Write Access on the share for this shared folder. I can access this folder from my non-domain computer. But when I try and create a file or copy a file into this share I get an access denied error?

What more do I need to open up to be able to access this share with read/write from a non-domain computer in our office?

Thank you.

You can map the drive with different saved credentials:

Hi @royceb,

I should have mentioned the reason behind my question. I have a SQL server script running a backup job. My script needs open access to this particular share without the need to use a share for login so we are using the UNC path of my Nethserver file share in the script.

I’ve enabled at first Everyone access but I think that just grants everyone on my domain access. So then I checked the Guest access box. This now allows me to see inside my shared folder but does not allow my script to write anything in my shared folder.

I need open access to this shared folder preferably without the need for login credentials. Is this possible with a Nethserver share?

Thank you.

Hi Charles

Why not simply add in a couple of lines in your script?
I’ve been doing such scripts for 30 years now - and I was considered a Windows guru at the time.

Net use and /delete for afterwards, or even better, check for the folder file if available, if not mount it and after use unmount it.

My 2 cents

@greavette would you please post a brief/simplifed version of your script? Or the abstract.
also, if possible, explaining which OS is used when the script is launched and what system (DBMS? OS? External tool?)

Hello all,

This is SQL script running on Windows server 2012 so we would need to enable xp_cmdshell (net use can’t be used in SQL scripts AFAIK). I would first map a network drive in windows to the Nethserver share , then in the SQL script connect to that mapped drive letter using xp_cmdshell. Then we would need another startup script in SQL to reconnect to the mapped drive (because xp_cmdshell is not persistent across restart). This is all doable but I thought if Nethserver could allow free access to anyone for this one particular share without credentials then I wouldn’t need to jump through these scripting hoops.

So what does Nethserver Guest access access and Everyone access mean on shared drives?

I’ll try and get a copy of the script from our DBA.

Thank you.


Hi Charles

My classic Method with Windows Servers / SQL is have the SQLdump run sometime (say 02:00) and leave the Dump in D:\Backups. In the beginning I’d have Windows copy the Backup to NAS or whatever Backup storage was in use at 03:00 - the SQL dump took max 20-30 minutes. The dump was about 1TB in size… (To big for offsite backups conventionally).

Later I let SQL do it’s dump as before, but shared the backup folder. SME-Server, later NethServer would mount the drive at 03:00, run rsync in a special script so I had 7 generations / week, and when finished, unmount the drive.

These 2 scripts included simple logging on the windows side, and a bit more on the linux side.

I too had issues with what a script could do in windows, so I moved on and polished the simple, but robust setup… Still working today, the script started in 1997 (!)

To optimize rsync synching to offsite, I even had the dumpfiles of SQL NOT contain date and time info in the filename, so every backup had the same name. The rsync copied the files to the NAS, and right into the daily folders, where a subfolder “Backup-SQL” was waiting…

Here is a screenshot of the Backup Folder on the NAS, this entire folder is again synched every night home, where another (identical) NAS was waiting. I say Identical, this was on purpose, to have a hardware spare ready in case of failure during a long weekend like xmas weekend, and no spare or support available…

This was Read-Only to any user, even Domain Admins can only read a file (To prevent a cryptolocker). User are allowed to copy the file away, and put it back into the right position.

This is a bit special, but since the financial company had 2 chiefs, and 5 employees and only 1 change in employees in the 15 years I’ve been doing their network, the users are very trusted.

My 2 cents

1 Like

Do you consider safe to allow guest access to that share with your SQL dump?
In any case, another workaround is something like this:

@echo Off
Set SQLServer=YourServer
SET Instance=YourDBInstance 
Set ScriptFolder=WhereTheScriptIs
Set DumpFolder=WhereToPutDumps
Set File1=%DumpFolder%\DBDump1.dmp
Set ZipFile1=%DumpFolder%\DBShrinked1.7z
Set File2=%DumpFolder%\DBDump2.dmp
Set ZipFile2=%DumpFolder%\DBShrinked2.7z
Set DBUser=
Set SQL_Script=%ScriptFolder%\YourDB_BCK.sql
Set ZipFolder=C:\Program Files\7-Zip
Set LogFile=%dumpfolder%\%date:~6,4%%date:~3,2%%date:~0,2%_Log.txt
echo %date% %TIME:~0,2%.%TIME:~3,2%>%logfile%
osql  -U %DBUser% -S %SQLServer%\%Instance% -i %SQL_Script
echo ---- EndScript %date% %TIME:~0,2%.%TIME:~3,2%>>%logfile%
cd /d %zipfolder%
7z a %ZipFile1% %File1% -mx7 -mmt2 2&>1>>%logfile%
echo ---- EndCompact1 %date% %TIME:~0,2%.%TIME:~3,2%>>%logfile%
7z a %ZipFile2% %File2% -mx7 -mmt2 2&>1>>%logfile%
echo ---- EndCompact2 %date% %TIME:~0,2%.%TIME:~3,2%>>%logfile%
if exist %ZipFile1% else del %file1%
if exist %ZipFile2% else del %file2%
echo ---- EndDel %date% %TIME:~0,2%.%TIME:~3,2%>>%logfile%
dir %dumpfolder% >>%logfile%
echo ---- EndDir %date% %TIME:~0,2%.%TIME:~3,2%>>%logfile%

With the related SQL Script, this buddy can dump and shrink several DB Files.
With a bit more tweaks, can also map the network drive (or only, check-in into server,then use the UNC path, then check-out closing connection) to dump directly over there, adding a bit of variables and commands.
Long story short: this kind of batch file is old and quite not performance optimized (dump 1, then shrink one while it’s dumping 2 than shrink 2) also used via PowerShell may be a lot better for optimization and system integration and dev-ops-ability of that.

1 Like