Macのユーザ関連の設定を間違えたのか、次のような問題が発生しています。
<そもそも何がしたかったか>
dbの勉強用に、Macにユーザを追加しようとしました
<問題が起きる前に何をしたか>
以下のスクリプトを「sudo zsh (ファイル名)」で実行しました。
lang
1#!/bin/zsh 2 3TARGETUSER=newuser 4PASSWORD="newpassword" 5 6GID=`dscl . list groups gid|grep \^staff | tail -1 | awk '{print $2}'` 7 8dscl . -create /Users/$postgres 9dscl . -create /Users/$postgres UserShell /bin/bash 10dscl . -create /Users/$postgres RealName $postgres 11 12maxid=$(dscl . -list /Users UniqueID | awk '{print $2}' | sort -ug | tail -1) 13newid=$((maxid+1)) 14 15dscl . -create /Users/$postgres UniqueID $newid 16dscl . -create /Users/$postgres PrimaryGroupID $GID 17dscl . -create /Users/$postgres NFSHomeDirectory /Users/$postgres 18 19cp -a /System/Library/User\ Template/English.lproj /Users/$postgres 20chown -R $postgres\:staff /Users/$postgres 21chmod 701 /Users/$postgres 22dscl . -passwd /Users/$postgres $(※パスワード)
※初めの部分のTARGETUSER と PASSWORD がそのままですが、この通りに動かしました(と言っても、実際に動かしたスクリプトの格納先にアクセスする権限がすでにないため、うろ覚えなのですが…)
http://qiita.com/matsubo/items/50a2530e6d6f9ac0645eを参照しました。
<問題が起きてから>
・Users以下にアクセスできない
・OS X needs to repair your Library to run applications. Type your password to allow this.というポップアップが断続的に表示される。(UsernameとPasswordの入力欄があり、Usernameにはもともと普段から使っていたユーザが表示されている。)
・Keychain "login" cannot be found to store "handoff-own-encryption-key"というポップアップが断続的に表示される。
どうすれば上記の問題が起きなくなるか、原因は何なのか、教えていただければ幸いです。よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/05 21:51