3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ローカルアカウントでwinexeを利用する

Posted at

LinuxからWindowsにリモートコマンドを実行する際に、winexeコマンドを使うことができます。

Windows Server接続時の認証に利用するアカウントとして、以下のいずれかを選択します。

  1. 所属ドメインのアカウント
  2. ローカルのAdministrator
  3. ローカルのアカウント(Administrator以外)

1や2のアカウントを利用する場合、ファイル共有サービス(CIFS:445/TCP)に接続でき、パスワードが正しければコマンド実行を行うことができます。

3のローカルアカウントを利用する場合は、次の準備が必要となります。

  1. ローカルアカウントを「管理者」に設定します。
  2. ローカルアカウントのリモートUACを無効に設定します。

それぞれの手順を記載します。

「コントロールパネル」-「ユーザーアカウント」-「アカウントの種類の変更」を開き、該当ユーザーのグループメンバーシップを「管理者」に変更します。

管理者権限でregeditを起動し、次の設定を行います。
HKEY_LOCAL_MACHINE - SOFTWARE - Microsoft - Windows - CurrentVersion - Policies - System に移動します。

「編集」-「新規」-「DWORD(32ビット値)」で新しいレジストリを追加します。
名前: LocalAccountTokenFilterPolicy
値: 1

以上の設定を完了後、winexeによるリモートコマンド実行が可能となります。

なお、Windows Defenderによりwinexeサービスの起動が行えない場合、下記の記事を参考にして、winexeサービスを許可してください。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?