su oracle 进不去,unable to su - oracle su: warning: cannot change directory to /home/oracle:

[[email protected] ~]# su - oracle

su: warning: cannot change directory to /home/oracle: Permission denied

su: /bin/bash: Permission denied

[[email protected] ~]# ls -lad /home/oracle/{.*,*}

drwxr-xr-x 18 oracle oinstall 4096 May 25 12:48 /home/oracle/.

drwxr-xr-x 7 root root 4096 May 24 17:07 /home/oracle/..

-rw-r--r-- 1 oracle oinstall 13587 May 24 13:15 /home/oracle/.bash_history

-rw-r--r-- 1 oracle oinstall 24 Feb 18 17:15 /home/oracle/.bash_logout

-rw-r--r-- 1 oracle oinstall 793 Mar 29 14:16 /home/oracle/.bash_profile

-rw-r--r-- 1 oracle oinstall 124 Feb 18 17:15 /home/oracle/.bashrc

drwxr-xr-x 3 oracle oinstall 4096 Feb 18 19:10 /home/oracle/.config

drwxr-xr-x 3 oracle oinstall 4096 Mar 21 10:49 /home/oracle/Desktop

-rw-r--r-- 1 oracle oinstall 26 Feb 18 17:33 /home/oracle/.dmrc

-rw-r--r-- 1 oracle oinstall 1975523 May 10 18:14 /home/oracle/ebaodev_ora_983192.out

-rw-r--r-- 1 oracle oinstall 18102950 May 5 15:04 /home/oracle/ebaodev_ora_983192.trc

drwxr-xr-x 2 oracle oinstall 4096 Feb 18 17:33 /home/oracle/.eggcups

-rw-r--r-- 1 oracle oinstall 515 Feb 18 17:15 /home/oracle/.emacs

-rw-r--r-- 1 oracle oinstall 16 Feb 21 11:29 /home/oracle/.esd_auth

drwxr-xr-x 4 oracle oinstall 4096 Mar 21 10:49 /home/oracle/.gconf

drwxr-xr-x 2 oracle oinstall 4096 Mar 21 14:10 /home/oracle/.gconfd

drwxr-xr-x 3 oracle oinstall 4096 Feb 18 17:33 /home/oracle/.gnome

drwxr-xr-x 8 oracle oinstall 4096 Mar 21 10:49 /home/oracle/.gnome2

drwxr-xr-x 2 oracle oinstall 4096 Feb 18 17:33 /home/oracle/.gnome2_private

drwxr-xr-x 2 oracle oinstall 4096 Feb 18 17:33 /home/oracle/.gstreamer-0.10

-rw-r--r-- 1 oracle oinstall 88 Feb 18 17:33 /home/oracle/.gtkrc-1.2-gnome2

-rw-r--r-- 1 oracle oinstall 758 Mar 21 10:49 /home/oracle/.ICEauthority

drwxr-xr-x 3 oracle oinstall 4096 Feb 18 17:15 /home/oracle/.kde

-rw-r--r-- 1 oracle oinstall 35 Mar 3 23:13 /home/oracle/.lesshst

drwxr-xr-x 3 oracle oinstall 4096 Feb 18 17:33 /home/oracle/.metacity

drwxr-xr-x 3 oracle oinstall 4096 Feb 23 11:38 /home/oracle/.mozilla

drwxr-xr-x 3 oracle oinstall 4096 Mar 21 10:49 /home/oracle/.nautilus

-rw-r--r-- 1 oracle oinstall 746 Feb 23 16:59 /home/oracle/.recently-used

-rw-r--r-- 1 oracle oinstall 26480 Mar 21 10:49 /home/oracle/.recently-used.xbel

drwxr-xr-x 3 oracle oinstall 4096 Feb 18 17:33 /home/oracle/.redhat

-rw-r--r-- 1 oracle oinstall 0 Apr 22 15:26 /home/oracle/sathish

-rw-r--r-- 1 oracle oinstall 148 Apr 20 21:01 /home/oracle/ss

-rw-r--r-- 1 oracle oinstall 0 Apr 22 15:29 /home/oracle/ssss

-rw-r--r-- 1 oracle oinstall 0 Apr 22 15:29 /home/oracle/ssssss

-rw-r--r-- 1 oracle oinstall 12288 Apr 20 21:12 /home/oracle/.ss.swp

-rw-r--r-- 1 oracle oinstall 41529 Feb 22 18:21 /home/oracle/testing.txt

-rw-r--r-- 1 oracle oinstall 146 Apr 22 16:04 /home/oracle/test.sh

drwxr-xr-x 3 oracle oinstall 4096 Feb 18 18:56 /home/oracle/.thumbnails

drwxr-xr-x 7 oracle oinstall 4096 Mar 4 13:06 /home/oracle/.Trash

-rw-r--r-- 1 oracle oinstall 8475 Apr 22 16:06 /home/oracle/.viminfo

-rw-r--r-- 1 oracle oinstall 918 Mar 21 10:49 /home/oracle/.xsession-errors

-rw-r--r-- 1 oracle oinstall 658 Feb 18 17:15 /home/oracle/.zshrcthank you dude.

Edited by: rajeysh on May 25, 2011 2:05 PM

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个警告 "su: warning: cannot change directory to /nonexistent: No such file or directory" 通常是由于用户的家目录设置有问题而引起的。 在 Linux 系统中,每个用户都有一个家目录,用于存储用户的个人文件和配置。当使用 `su` 命令切换到其他用户时,系统会尝试切换到该用户的家目录。 然而,如果用户的家目录不存在或设置错误,就会出现上述警告。这可能会导致一些问题,例如无法加载用户的配置文件或无法访问其个人文件。 要解决这个问题,你可以尝试以下步骤: 1. 确认用户的家目录是否存在。你可以通过运行以下命令来检查: ``` ls -ld /home/<用户名> ``` 请将 `<用户名>` 替换为受影响用户的实际用户名。如果该目录不存在,请创建它: ``` sudo mkdir /home/<用户名> sudo chown <用户名>:<用户名> /home/<用户名> ``` 同样,将 `<用户名>` 替换为用户的实际用户名。 2. 确保 `/etc/passwd` 文件中用户的家目录路径是正确的。可以使用文本编辑器打开 `/etc/passwd` 文件,并检查 `<用户名>` 的行。确认该行中第六个字段是正确的家目录路径。 3. 如果你对用户的家目录路径进行了更改,请确保更新了 `/etc/passwd` 文件中相应用户的家目录路径。 4. 如果以上步骤都没有解决问题,可能需要重新创建用户的账户。 注意:在进行任何更改之前,请确保备份重要的系统文件和数据。 希望这些步骤能够解决你的问题!如果还有其他疑问,请随时提问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值