/home 디렉토리는 사용하려는 시도가 있을때 autofs 에 의해 자동으로 마운트 되는 Indirect map 이다.

하지만 Network 영역의 자동접근을 허용할 이유도 없고, 보안적인 요소로 autofs 를 disable 하는게 일반적이다.

또한 다른 Unix 계열에서는 /home 디렉토리가 사용자 디렉토리로 사용되기 때문에, 자유롭게 사용하도록 설정하는것이 더 나을 수 도 있다.

물론 /export/home 에 생성된 사용자 디렉토리를 /home 에 연결해 사용할 수 있겠으나, 추천하는 방법은 아니다.

 

1. /home 디렉토리 사용으로 설정

 

[root@rinodb1:/home:#] mkdir oracle 
mkdir: cannot create directory 'oracle': Operation not applicable

 

[root@rinodb1:~:#] vi /etc/auto_master
#
# Copyright (c) 1992, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Master map for automounter
#
#+auto_master
#/net    -hosts          -nosuid,nobrowse
#/home      auto_home     -nobrowse
#/nfs4      -fedfs          -ro,nosuid,nobrowse

 - 모두 주석처리

 

[root@rinodb1:~:#] vi /etc/auto_home
#
# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident     "%Z%%M% %I% %E% SMI"
#
# Home directory map for automounter
#
#+auto_home

 - 모두 주석처리

 

[root@rinodb1:~:#] svcadm disable autofs
[root@rinodb1:~:#] svcs autofs
STATE          STIME            FMRI 
disabled       23:13:01         svc:/system/filesystem/autofs:default

 

2. Symbolic Link 설정

 - /home 디렉토리를 /export/home 과 별도로 사용해도 되지만, Solaris 는 기본적으로 /export/home = /home 이기 때문에 Symbolic Link 를 설정하여 같은 영역을 바라보게 하는것이 효율적이다.

[root@rinodb1:~:#] rm -rf /home
[root@rinodb1:~:#] ln -s /export/home /home

 

3. 계정생성

 - 흔히 user 계정 생성 시 부모 디렉토리가 zfs filesystem 인 경우 자동으로 zfs filesystem 으로 생성되기 때문에, 일부 사이트는 거부하는 곳도 있다.  따라서 /export/home 이 아닌, /home 밑에 홈디렉토리를 생성한다

[root@rinodb1:~:#] useradd -u 1001 -g dba -d /home/oracle -m oracle

 

 

 

반응형

+ Recent posts