Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with Net Share

736 views
Skip to first unread message

J�rgen Meyer

unread,
May 1, 2013, 6:04:35 AM5/1/13
to
The following works on a German Win7 System:
Net Share Memories=C:\ProgramData\Memories /Grant:Jeder,Change

Jeder means Everyone
But Everyone doesn't work on a German system.

To make it international, I tried this:
Net Share Memories=C:\ProgramData\Memories /Grant:*S-1-1-0,Change

But that is producing a system error 1322
So how to fix?

Regards
Juergen

Auric__

unread,
May 1, 2013, 9:20:25 AM5/1/13
to
Did you actually try "Everyone" instead of "Jeder"?

--
Something terrible was going on. The best soldier in any army,
lying on his bunk crying. The silence in the room was deep.

J�rgen Meyer

unread,
May 1, 2013, 12:39:13 PM5/1/13
to
On Wed, 1 May 2013 13:20:25 +0000 (UTC), "Auric__" <not.m...@email.address>
wrote:

>J�rgen Meyer wrote:
>
>> The following works on a German Win7 System:
>> Net Share Memories=C:\ProgramData\Memories /Grant:Jeder,Change
>>
>> Jeder means Everyone
>> But Everyone doesn't work on a German system.
>>
>> To make it international, I tried this:
>> Net Share Memories=C:\ProgramData\Memories /Grant:*S-1-1-0,Change
>>
>> But that is producing a system error 1322
>> So how to fix?
>
>Did you actually try "Everyone" instead of "Jeder"?

Yes, of course.
Same error 1322
Some items are translated in the German version, some not.
Therefore I tried to use the SID.
But out of luck.

Juergen

Herbert Kleebauer

unread,
May 1, 2013, 1:43:18 PM5/1/13
to
On 01.05.2013 18:39, J�rgen Meyer wrote:

>>> The following works on a German Win7 System:
>>> Net Share Memories=C:\ProgramData\Memories /Grant:Jeder,Change
>>>
>>> Jeder means Everyone
>>> But Everyone doesn't work on a German system.

>> Did you actually try "Everyone" instead of "Jeder"?
>
> Yes, of course.
> Same error 1322
> Some items are translated in the German version, some not.

Are you sure that "/Grant:Jeder" simple means a user with the name
"Jeder"? From the German Microsoft Book "Windows-Administration � Die
technische Referenz":

Da beim Erstellen von Freigaben mit den Werkzeugen der
Benutzeroberfl�che standardm��ig nur die Zulassungsberechtigung
Lesen f�r Jeder gew�hrt wird, sollten Sie Freigaben stattdessen
mit dem Befehl net share und der Option /grant:everyone, full
anlegen und gleichzeitig die Berechtigungen zuweisen.

frank.w...@gmail.com

unread,
May 1, 2013, 5:10:21 PM5/1/13
to
From Herbert Kleebauer :
>>> Did you actually try "Everyone" ...

>/grant:everyone, full

Case sensative?

Frank

Jürgen Meyer

unread,
May 5, 2013, 4:33:57 AM5/5/13
to
On Wed, 01 May 2013 19:43:18 +0200, Herbert Kleebauer <kl...@unibwm.de> wrote:

>On 01.05.2013 18:39, Jürgen Meyer wrote:
>
>>>> The following works on a German Win7 System:
>>>> Net Share Memories=C:\ProgramData\Memories /Grant:Jeder,Change
>>>>
>>>> Jeder means Everyone
>>>> But Everyone doesn't work on a German system.
>
>>> Did you actually try "Everyone" instead of "Jeder"?
>>
>> Yes, of course.
>> Same error 1322
>> Some items are translated in the German version, some not.
>
>Are you sure that "/Grant:Jeder" simple means a user with the name
>"Jeder"? From the German Microsoft Book "Windows-Administration – Die
>technische Referenz":
>
> Da beim Erstellen von Freigaben mit den Werkzeugen der
> Benutzeroberfläche standardmäßig nur die Zulassungsberechtigung
> Lesen für Jeder gewährt wird, sollten Sie Freigaben stattdessen
> mit dem Befehl net share und der Option /grant:everyone, full
> anlegen und gleichzeitig die Berechtigungen zuweisen.

Hello Herbert,
Tnx for the answer.
Not all what you find in a book is correct.
Do you ever have tried that example on a German system yourself?
'Everyone' definitely won't work.

The first problem is that Everyone or Jeder is treated as a normal name like
Peter, John etc.
So the entry differs in every language.
This also applies to other expressions like User=Benutzer etc.

The second problem it that Net Share does not accept a SID after /Grant:
A command like this will not work:
Net Share Memories=C:\ProgramData\Memeories /Grant:'S-1-1-0',Change

But I now found a solution.
At first one need to resolve the name from the SID.
A list of the most important SIDs you will find here:
http://support.microsoft.com/kb/243330

The batch now looks like this:

set MySid=S-1-1-0
for /f "delims= " %%a in ('"wmic path win32_account where SID='%MySid%' get
name"') do (
if not "%%a"=="Name" (
set myvar=%%a
goto :loop_end
)
)
:loop_end

net share Memories /Delete
net share Memories=C:\ProgramData\Memories /grant:%myvar%,change

If someone knows a shorter way to get the name from the SID, please let me
know.

Juergen

Frank Westlake

unread,
May 5, 2013, 5:09:29 AM5/5/13
to
2013-05-05 01:33, Jürgen Meyer:
> for /f "delims= " %%a in ('"wmic path win32_account where SID='%MySid%' get
> name"') do (

That gives you the name "Everyone", which is what you claim was not
being accepted. Perhaps the problem is your code page, or perhaps your
script editor. Try the script

ECHO Everyone>script

And try at a command prompt

ECHO Everyone>manual

Then examine the files "script" and "manual" with a hex editor. If your
system has CERTUTIL.EXE then you can get this script
<https://github.com/FrankWestlake/CMD-scripts/blob/master/hex.cmd> and
run

HEX script
HEX manual

Frank

Tom Del Rosso

unread,
May 5, 2013, 5:43:47 AM5/5/13
to

J�rgen Meyer wrote:
>
> But I now found a solution.
> At first one need to resolve the name from the SID.
> A list of the most important SIDs you will find here:
> http://support.microsoft.com/kb/243330
>
> The batch now looks like this:
>
> set MySid=S-1-1-0
> for /f "delims= " %%a in ('"wmic path win32_account where
> SID='%MySid%' get name"') do (

Does that return Everyone or Jeder or something else on the German system?


--

Reply in group, but if emailing remove the last word.


Herbert Kleebauer

unread,
May 5, 2013, 11:31:24 AM5/5/13
to
On 05.05.2013 11:43, Tom Del Rosso wrote:
> J�rgen Meyer wrote:
>>
>> But I now found a solution.
>> At first one need to resolve the name from the SID.
>> A list of the most important SIDs you will find here:
>> http://support.microsoft.com/kb/243330
>>
>> The batch now looks like this:
>>
>> set MySid=S-1-1-0
>> for /f "delims= " %%a in ('"wmic path win32_account where
>> SID='%MySid%' get name"') do (
>
> Does that return Everyone or Jeder or something else on the German system?

@echo off
set MySid=S-1-1-0
for /f "delims= " %%a in ('"wmic path win32_account where SID='%MySid%' get name"') do echo %%a

The output is:

Name
Jeder
ECHO ist ausgeschaltet (OFF).

Tom Del Rosso

unread,
May 5, 2013, 12:56:35 PM5/5/13
to

Herbert Kleebauer wrote:
>
> @echo off
> set MySid=S-1-1-0
> for /f "delims= " %%a in ('"wmic path win32_account where
> SID='%MySid%' get name"') do echo %%a
>
> The output is:
>
> Name
> Jeder
> ECHO ist ausgeschaltet (OFF).

Then why does it work, where the literal string did not? He used the same
capitalization. Is one of the 'e' characters a different 'e' with a
diacritical, which might display in the cmd window as a regular 'e'?

Jürgen Meyer

unread,
May 5, 2013, 3:53:10 PM5/5/13
to
BTW:
I also have a Spanish system here.
The output there is "Todos"
It works on XP and Win 7
So I'm quite sure it will work with all other languages too, as the SIDs are
language independent.

Juergen

Tom Del Rosso

unread,
May 5, 2013, 5:50:14 PM5/5/13
to

Jürgen Meyer wrote:
> BTW:
> I also have a Spanish system here.
> The output there is "Todos"
> It works on XP and Win 7
> So I'm quite sure it will work with all other languages too, as the
> SIDs are language independent.

Did you find out why typing Jeder didn't work? Can you output that variable
to a file and show a hex dump?

Jürgen Meyer

unread,
May 6, 2013, 6:06:16 AM5/6/13
to
On Sun, 5 May 2013 17:50:14 -0400, "Tom Del Rosso"
<tom...@verizon.net.invalid> wrote:

>Did you find out why typing Jeder didn't work? Can you output that variable
>to a file and show a hex dump?

Misunderstanding?
Jeder works, but only on a German system
My intention was to create a solution that woks on every system
Juergen

Tom Del Rosso

unread,
May 6, 2013, 9:19:08 AM5/6/13
to
Yes, I read the OP but over a few days I forgot the problem. Sorry.

Frank Westlake

unread,
May 6, 2013, 10:48:48 AM5/6/13
to
2013-05-06 06:19, Tom Del Rosso:
> J�rgen Meyer wrote:
>> Jeder works, but only on a German system
>> My intention was to create a solution that woks on every system
>> Juergen
>
> Yes, I read the OP but over a few days I forgot the problem. Sorry.

The original:

2013-05-01 03:04, Jürgen Meyer:
> To make it international, I tried this:
> Net Share Memories=C:\ProgramData\Memories /Grant:*S-1-1-0,Change

It wasn't easy to read that intent; I missed it and I can tell by the
replies that most others, if not all, also missed it. With what I now
understand of the problem, the resolution seems good.

Frank

0 new messages