- Remove From My Forums
-
Вопрос
-
Доброго времени суток всем!
Есть крохотный батник на контроллере WS 2012, убивающий и расшаривающий нужную папку. Точнее, пока не расшаривающий =)
net share FILEEXCHANGE /DELETE /YES
rmdir /s /q C:BATCHFileexchange
mkdir C:BATCHFileexchange
net share FILEEXCHANGE=C:BATCHFileexchange /Grant:Everyone,FullВ 2003-м, 2008-м и 2008-м R2 все работало. В 2012-м пишет:
«System error 1332 has occurred.
No mapping between account names and security IDs was done.»
Есть идеи, в чем может быть дело?
Спасибо!
Ответы
-
А у вас ОС случайно не локализованная (русская)? В таком случае попробуйте:
net share FILEEXCHANGE=C:BATCHFileexchange /Grant:»Все»,Full
-
Изменено
7 августа 2013 г. 14:56
-
Помечено в качестве ответа
DobriyChelovek
7 августа 2013 г. 15:41
-
Изменено
-
Евгений, спасибо большое!
Ваш вариант работает, правда, только из командной строки…
Если запускать это команду из батника вылезают крокозябли вместо «Все».
Не понимаю, как научить cmd русскому языку… =(
попробуйте так:
chcp 1251
net share FILEEXCHANGE=C:BATCHFileexchange /Grant:»Все»,Full
-
Помечено в качестве ответа
DobriyChelovek
8 августа 2013 г. 6:24
-
Помечено в качестве ответа
- Remove From My Forums
-
Question
-
Hello,
I am using NET SHARE to create file shares on a W1K12R2 server and getting the subject message with a component of the command. Command goes like this:
NET SHARE Engineering=E:DataEngineering /GRANT:»DOMAINGroupName with one space,CHANGE» /GRANT:»DOMAINGroupName with two spaces,READ» /GRANT:HOSTNAMEAdministrators,FULL
My issue is that the command works fine if I do not put in the /GRANT:»DOMAINGroupName with two spaces,READ» parameter. With it I get:
System error 1332 has occurred.
No mapping between account names and security IDs was done.My head is highly scratched. Using Power Shell and New-SMBShare gives the same result.
-
Edited by
Thursday, December 29, 2016 9:17 PM
-
Edited by
Answers
-
Happy New Year!
Anyway, event logs are clean and I have solved my problem. While adding via GUI to determine if anything was different, I noticed that the GUI showed me the following for the group in question:
Group Name Read (DomainGroup Name Read Only), i.e., the SAM Account Name. For groups, I did not expect to find a difference between the common name and the SAM Account Name. Why the Powers That Be did that, is beyond me.
I expect it for human names, but not for groups.I have answered my own question. Darn!
-
Marked as answer by
Ward Galanis
Tuesday, January 3, 2017 6:49 PM
-
Marked as answer by
As i am trying to set the following command in powershell:
NET SHARE ShareName=C:DataUsersDefaultAccountAppDataLocal /GRANT:UserName, READ
I get the following result:
NET : The syntax of this command is:
+ CategoryInfo : NotSpecified: (The syntax of this command is::String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
NET SHARE
sharename
sharename=drive:path [/GRANT:user,[READ | CHANGE | FULL]]
[/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents| Programs | BranchCache | None]
sharename [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents | Programs | BranchCache | None]
{sharename | devicename | drive:path} /DELETE
sharename \computername /DELETE
I just can’t find any syntax misstake.
I have already tried to put a «`» before the comma, that didn’t help anything.
Any hints?
Vadim Kotov
8,0448 gold badges48 silver badges62 bronze badges
asked Mar 16, 2018 at 14:55
5
Please run your Powershell ISE as Administrator.
keep your command inside $() and execute it as below example.
$(NET SHARE Neha=D:NehaNeha GRANT:Username,READ)
Neha was shared successfully.
Please try and let me know if you need any assistance.
chirag90
2,2011 gold badge22 silver badges37 bronze badges
answered Mar 16, 2018 at 15:29
#1
Гость_VladВ_*
Отправлено 25 Декабрь 2004 — 09:24
Здарова ….
Имеется:
1. Win2003 Ent serv, как файл сервер.
2. Win2k Adv serv, DC.
Надо:
расшарить коммандой net share через шедулер папку 123 на 2003 машинке, на полный доступ !всем!
Если назначаем одному:
net share 123=c:123 /grant:vlad@blablabla.kz,full
123 успешно назначен общим.
но:
net share 123=c:123 /grant:all@blablabla.kz,full
Системная ошибка 1332.
Именам пользователей не сопоставлены коды защиты данных.
и:
net share 123=c:123 /grant:everyone@blablabla.kz,full
Системная ошибка 1332.
Именам пользователей не сопоставлены коды защиты данных.
Если я че нить понимаю, то All и Everyone, которые берутся с контроллера домена, почему то не понимаются 2003-м… Так же интересно то что через GUI все назначается и работает
Есть еще мысля, что All и Everyone не юзеры, а группы и в этом заморочка, но решить не смог.
Подскажите если кто сталкивался… в 2000 serv, права на шару назначаются по дефолту «всем full» , а в ХР «всем read only.
Другие варианты приветствуются.
_________________
- Наверх