LoginSignup
8

More than 5 years have passed since last update.

MacからWindowsファイルサーバーのパスワードを変更する

Last updated at Posted at 2015-11-11

手元にはMac。使っているファイルサーバーはWindows。そしてWindowsパスワードの有効期限が切れた。

わりとよくあるシチュエーションではないかと思います。
そんな時泣く泣く近所のWindowsユーザーの手を借りてパスワード変更をしていませんか?

今日からその涙は不要です。

MacにはHomebrewがあるのですから。んで、Homebrewでsamba入れちゃえばsmbpasswdが付いてくるのですから。

Homebrewとは
簡単にいえばmac用パッケージ管理ツールです。
http://brew.sh/index_ja.html

sambaとは
簡単にいえばWindowsファイルサーバーを立ち上げたりなんだりするツールです。
https://www.samba.org/

MacOS 10.10で確認しています。

Install

terminalを立ち上げ以下のコマンドを打ち込みます。

Homebrewのインストール

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

xcode command line tools がインストールされていない場合には途中でインストールを求められるので流れに身を任せてください。
Screen Shot 2015-11-12 at 09.45.20.png

sambaのインストール

brew install homebrew/boneyard/samba

sambaが公式のfomulaから外れてしまったらしく、bonyardからインストールします。

2行で準備が済みました。

How to use

パスワードの変更です。
terminalを立ち上げ以下のコマンドを打ち込みます。

smbpasswd -r サーバー名 -U ユーザー名

古いパスワード、新しいパスワード(×2)入力でパスワード変更完了です。簡単ですね!

では良いMacライフを。

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
8