ablog

不器用で落着きのない技術者のメモ

Solaris 10 で /home 以下にユーザのホームディレクトリを作成する

oracleユーザのホームディレクトリ /home/oracle を作成しようとすると失敗した。

# mkdir /home/oracle
mkdir: Failed to make directory "/home/oracle"; Operation not applicable
# ls -l / | grep home
dr-xr-xr-x   2 root     root           2 Dec 31 12:19 home
# chmod u+w /home
chmod: WARNING: can't change /home

Solaris では /home ディレクトリはオートマウントデーモンの管理下にあり、mkdir /home/oracle ではユーザのホームディレクトリを作成できないらしい。http://www.b-dash.net/solaris/solaris_5.html を参考にユーザのディレクトリを作成することができた。

# mkdir -p /export/home/users/oracle
# chown oracle:oinstall /export/home/users/oracle 
# vi /etc/auto_master
+auto_home
oracle         localhost:/export/home/users/oracle <-- 追記
# svcadm restart svc:/system/filesystem/autofs:default