重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 5363|回复: 2
打印 上一主题 下一主题

[安装] 创建oracle用户后,切换用户,没有/home/oracle这个目录

[复制链接]
跳转到指定楼层
楼主
发表于 2016-3-18 09:56:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
安装数据库的时候我们需要用oracle用户,可是今天创建oracle用户,切换过去有一个警告信息。
rac01:~ # su - oracle
su: warning: cannot change directory to /home/oracle: No such file or directory


以前创建没有遇到过这个问题。

原来这是因为我的系统是
SUSE Linux Enterprise Server 11
在SUSE系统下创建用户 时要加 -m 参数才会给新用户创建/home目录

重新创建
useradd -m oracle

rac01:~ # su - oracle
oracle@rac01:~>

oracle@rac01:~> cd /home
oracle@rac01:/home>


不再有警告信息,/home目录已经创建。
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
发表于 2016-3-21 10:51:31 | 只看该作者
察看一下,是否有 /etc/login.defs,如果有,把这个文件内容发出来看看
回复 支持 反对

使用道具 举报

板凳
 楼主| 发表于 2016-3-21 15:14:05 | 只看该作者
/etc/login.defs 的文件内容如下
# /etc/login.defs - Configuration control definitions for pwdutils package.
#
# Comment lines (lines beginning with "#") and blank lines are ignored.
# Please read the manual page for more information (login.defs.5).
#
#
# Should login be allowed if we can't cd to the home directory?
# Default is yes.
#
DEFAULT_HOME            yes
#
# The default PATH settings (used by login):
#
ENV_PATH                /usr/local/bin:/usr/bin:/bin
#
# The default PATH settings for root (used by login):
#
ENV_ROOTPATH            /sbin:/bin:/usr/sbin:/usr/bin
#
# Delay in seconds before being allowed another attempt
# after a login failure
#
FAIL_DELAY              3
#
# If defined, file which inhibits all the usual chatter
# during the login sequence. If a full pathname, then hushed
# mode will be enabled if the user's name or shell are found
# in the file.  If not a full pathname, then hushed mode will
# be enabled if the file exists in the user's home directory.
#
#HUSHLOGIN_FILE .hushlogin
HUSHLOGIN_FILE  /etc/hushlogins
#
# Enable logging and display of /var/log/lastlog login time info.
#
LASTLOG_ENAB            yes
#
# Enable display of unknown usernames when login failures
# are recorded.
#
LOG_UNKFAIL_ENAB        no
#
# Max number of login retries if password is bad
# This variable is deprecated and will be removed with the next version.
#
LOGIN_RETRIES           3

和redhat的有区别,没有CREATE_HOME这个参数  
将CREATE_HOME yes 这个参数加入到文件中去,再去创建用户 ,依然没有自动创建/home 目录
rac01:~ # su - test
su: warning: cannot change directory to /home/test: No such file or directory

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-26 13:00 , Processed in 0.207671 second(s), 26 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表