|
|
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
Есть удалённая машина rserv. На этой машине есть шара \\rserv\c$ Я хочу из своей проги (скрипта на пайтоне) скопировать в эту шару кое что. Проблема в том, что для доступа к машине требуется пароль. Вопрос первый: можно ли пароль с логином указать в путе к шаре? Ну тоесть чтобы получилась одна консольная команда. Ещё на этой же машине вертится некий сервис. Сервис этот надо остановить, а потом снова запустить. Вопрос второй: есть ли консольная команда для остановки и пуска сервисов на удалённых машинах? А на родных? Код: plaintext ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 11:03:37 |
|
||
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
Ответы зависят от того какая версия Windows стоит по первому вопросу неясно какой пароль требуется по второму ответов несколько, например sc Posted via ActualForum NNTP Server 1.4 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 11:12:33 |
|
||
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
Винда на локальном - XP. На удалённом - 2003 сервер. Пароль вот какой: если я лезу из проводника, то меня просят ввести логин и пароль. Логин, кстати, из другого домена. По второму можно какойнибудь ответ поподробней? Код: plaintext ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 11:23:45 |
|
||
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
Пуск-Выполнить-cmdnet use \\servername\admin$ /user:username password sc stop \\servername servicename net use \\servername\admin$ /delete ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 11:31:18 |
|
||
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
rrrrrrrrrr Пуск-Выполнить-cmdnet use \\servername\admin$ /user:username password sc stop \\servername servicename net use \\servername\admin$ /delete А имя диска? :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 11:32:57 |
|
||
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
Имя пользователя и пароль - от той учетки, у которой есть админские права на удаленной машине Только если вы уже залогинились на ней (допустим, из проводника), то ломиться из батника надо либо по ip, либо закрыть все подключений к этому серверу - под двумя разными credentials с одной и той же машины нельзя :( ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 11:36:56 |
|
||
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
MZH rrrrrrrrrr Пуск-Выполнить-cmdnet use \\servername\admin$ /user:username password sc stop \\servername servicename net use \\servername\admin$ /delete А имя диска? :) а не надо :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 11:38:02 |
|
||
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
rrrrrrrrrr Пуск-Выполнить-cmdnet use \\servername\admin$ /user:username password sc stop \\servername servicename net use \\servername\admin$ /delete Ох не нравится, мне этот /delete Виндовая версия root# rm -rf / ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 12:05:25 |
|
||
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
Виндовая версия этого дела выглядит иначе: del c:\*.* /f /s /q А чтобы /delete нравился и не пугал, смотрим хелп: net help useC:\>net help use The syntax of this command is: NET USE [devicename | *] [\\computername\sharename[\volume] [password | *]] [/USER:[domainname\]username] [/USER:[dotted domain name\]username] [/USER:[username@dotted domain name] [/SMARTCARD] [/SAVECRED] [[/DELETE] | [/PERSISTENT:{YES | NO}]] NET USE {devicename | *} [password | *] /HOME NET USE [/PERSISTENT:{YES | NO}] NET USE connects a computer to a shared resource or disconnects a computer from a shared resource. When used without options, it lists the computer's connections. devicename Assigns a name to connect to the resource or specifies the device to be disconnected. There are two kinds of devicenames: disk drives (D: through Z:) and printers (LPT1: through LPT3:). Type an asterisk instead of a specific devicename to assign the next available devicename. \\computername Is the name of the computer controlling the shared resource. If the computername contains blank characters, enclose the double backslash (\\) and the computername in quotation marks (" "). The computername may be from 1 to 15 characters long. \sharename Is the network name of the shared resource. \volume Specifies a NetWare volume on the server. You must have Client Services for Netware (Windows Workstations) or Gateway Service for Netware (Windows Server) installed and running to connect to NetWare servers. password Is the password needed to access the shared resource. * Produces a prompt for the password. The password is not displayed when you type it at the password prompt. /USER Specifies a different username with which the connection is made. domainname Specifies another domain. If domain is omitted, the current logged on domain is used. username Specifies the username with which to logon. /SMARTCARD Specifies that the connection is to use credentials on a smart card. /SAVECRED Specifies that the username and password are to be saved. This switch is ignored unless the command prompts for username and password. This option is not available on Windows XP Home Edition and will be ignored. /HOME Connects a user to their home directory. /DELETE Cancels a network connection and removes the connection from the list of persistent connections. /PERSISTENT Controls the use of persistent network connections. The default is the setting used last. YES Saves connections as they are made, and restores them at next logon. NO Does not save the connection being made or subsequent connections; existing connections will be restored at next logon. Use the /DELETE switch to remove persistent connections. NET HELP command | MORE displays Help one screen at a time. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 12:08:54 |
|
||
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
Спасибо большое! Код: plaintext ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 12:15:45 |
|
||
|
Два впроса про виндовую консоль.
|
|||
|---|---|---|---|
|
#18+
MZH rrrrrrrrrr Пуск-Выполнить-cmdnet use \\servername\admin$ /user:username password sc stop \\servername servicename net use \\servername\admin$ /delete А имя диска? :) А никаких имен дисков и нет, есть только шаринг (выделеный ресурс) - LANMAN другого и не поддерживает. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.08.2007, 16:50:55 |
|
||
|
|

start [/forum/topic.php?fid=26&gotonew=1&tid=1506792]: |
0ms |
get settings: |
9ms |
get forum list: |
19ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
38ms |
get topic data: |
11ms |
get first new msg: |
5ms |
get forum data: |
2ms |
get page messages: |
71ms |
get tp. blocked users: |
2ms |
| others: | 214ms |
| total: | 377ms |

| 0 / 0 |
