useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
Creating mailbox file: File existsbash
解決useradd:warning:the home directory already...的問題oracle
在RHEL 5或CentOS5中安裝oracle11g時,get
www.2cto.com it
groupadd oinstall配置
groupadd dbafile
mkdir -p /u01/oracle ( /u01/oracle 就在這裏安裝Oracle 11g)權限
創建用戶:密碼
useradd -g oinstall -G dba -d /u01/oracle oracle配置文件
結果報錯:腳本
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
進入/u01/oracle目錄,沒有.bash_profile',.bashrc,bash_logout
緣由:
系統添加用戶的標準步驟
1.編輯/etc/passwd與/etc/group
2.建立用戶主目錄
3.從/etc/skel拷貝文件與目錄
4.讓新用戶得到其主目錄與文件的擁有權限
5.給新用戶一個密碼
解決辦法:
依舊使用上面的腳本建用戶,而後手動拷貝配置文件到/u01/oracle下。
cp /etc/skel/.bash_profile /u01/oracle
cp /etc/skel/.bashrc /u01/oracle
cp /etc/skel/.bash_logout /u01/oracle
這樣既可。