rhel5 新建用户提示:the home directory already exists.(as4不存在这个问题)
环境如下:
[oracle@rhel5 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 6.7G 2.9G 3.5G 46% /
/dev/sda2 22G 173M 21G 1% /oracle
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 250M 0 250M 0% /dev/shm
/dev/hdc 34M 34M 0 100% /media/cdrom
[root@rhel5 ~]# useradd -g dba -u 505 -d /oracle oracle
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
解决办法:
[root@rhel5 ~]# cp /etc/skel/.bash* /oracle/
[root@rhel5 ~]# passwd oracle
[root@rhel5 ~]# chown -R oracle:dba /oracle/