useradd: warning: the home directory already exists.

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

 

这样既可。

相关文章
相关标签/搜索