ALL permissions denied for root
I REALLY need help.
I cannot do ANYTHING on my RedHat Enterprise distro. I do not have permissions for ANYTHING, even as superuser or root. EXAMPLE: [admin@localhost ~]$ su - Password: [root@localhost root]$ whoami root [root@localhost root]$ pwd /root [root@localhost root]$ touch x touch: creating `x': Permission denied <<<<<<< !!!!!!!!!!!!!!!!! -------------------------------------------------------------------------- [root@localhost root]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 32G 2.1G 28G 8% / /dev/sda1 97M 26M 67M 28% /boot none 626M 0 626M 0% /dev/shm -------------------------------------------------------------------------- [root@localhost root]$ mount /dev/sda2 on / type ext3 (rw) none on /proc type proc (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) usbdevfs on /proc/bus/usb type usbdevfs (rw) /dev/sda1 on /boot type ext3 (rw) none on /dev/shm type tmpfs (rw) -------------------------------------------------------------------------- [root@localhost root]$ set BASH=/bin/bash BASH_ENV=/root/.bashrc BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i386-redhat-linux-gnu") BASH_VERSION='2.05b.0(1)-release' COLORS=/etc/DIR_COLORS COLUMNS=132 DIRSTACK=() EUID=4294967295 GROUPS=() G_BROKEN_FILENAMES=1 HISTFILE=/root/.bash_history HISTFILESIZE=1000 HISTSIZE=1000 HOME=/root HOSTNAME=localhost.localdomain HOSTTYPE=i386 IFS=$' \t\n' INPUTRC=/etc/inputrc LANG=en_US.UTF-8 LANGVAR=en_US.UTF-8 LESSOPEN='|/usr/bin/lesspipe.sh %s' LINES=49 LOGNAME=root LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi =01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=0 1;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.g z=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01; 35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:' MACHTYPE=i386-redhat-linux-gnu MAIL=/var/spool/mail/root MAILCHECK=60 OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/root/bin PIPESTATUS=([0]="0") PPID=24842 PS1='[\u@\h \W]\$ ' PS2='> ' PS4='+ ' PWD=/root SHELL=/bin/bash SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor SHLVL=1 SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass SUPPORTED=en_US.UTF-8:en_US:en TERM=vt100 UID=4294967295 USER=root USERNAME=root _=mount -------------------------------------------------------------------------- [root@localhost root]$ ls -l .* -rw------- 1 0 root 8220 Sep 1 19:52 .bash_history -rw-r--r-- 1 0 root 24 Jun 10 2000 .bash_logout -rw-r--r-- 1 0 root 233 Jun 9 11:00 .bash_profile -rw-r--r-- 1 0 root 176 Aug 23 1995 .bashrc -rw-r--r-- 1 0 root 244 Mar 14 15:40 .cshrc -rw-r--r-- 1 0 root 51 Jul 11 11:38 .fonts.cache-1 -rw-r--r-- 1 0 root 120 Aug 24 2004 .gtkrc -rw-r--r-- 1 0 root 130 Feb 16 2005 .gtkrc-1.2-gnome2 -rw------- 1 0 root 0 Feb 19 2005 .ICEauthority -rw------- 1 0 root 0 Feb 16 2005 .recently-used -rw------- 1 0 root 559 Feb 16 2005 .rhn-applet.conf -rw-r--r-- 1 0 root 196 Jul 11 2000 .tcshrc -rw------- 1 0 root 164 Feb 16 2005 .Xauthority -rw-r--r-- 1 0 root 1126 Aug 23 1995 .Xresources -rw------- 1 0 root 1112 Feb 16 2005 .xsession-errors .: total 36 -rw-r--r-- 1 0 root 1182 Feb 1 2005 anaconda-ks.cfg -rw-r--r-- 1 0 root 21765 Feb 1 2005 install.log -rw-r--r-- 1 0 root 4247 Feb 1 2005 install.log.syslog ..: total 201 drwxr-xr-x 2 0 root 4096 Feb 1 2005 bin drwxr-xr-x 4 0 root 1024 Feb 1 2005 boot -rw-r--r-- 1 0 root 561 Mar 4 2005 csh.cshrc drwxr-xr-x 22 0 root 118784 Feb 19 2005 dev drwxr-xr-x 64 0 root 8192 Sep 1 18:00 etc drwxr-xr-x 5 0 root 4096 Jun 17 09:29 home drwxr-xr-x 2 0 root 4096 Jan 24 2003 initrd drwxr-xr-x 11 0 root 4096 Feb 1 2005 lib drwx------ 2 0 root 16384 Feb 1 2005 lost+found drwxr-xr-x 2 0 root 4096 Nov 11 2004 misc drwxr-xr-x 4 0 root 4096 Feb 1 2005 mnt drwxr-xr-x 2 0 root 4096 Jan 24 2003 opt dr-xr-xr-x 86 0 root 0 Feb 19 2005 proc drwxr-x--- 14 0 root 4096 Jul 11 13:51 root drwxr-xr-x 2 0 root 8192 Feb 1 2005 sbin drwxrwxrwt 9 0 root 4096 Sep 10 11:50 tmp drwxr-xr-x 17 0 root 4096 Jun 17 09:13 usr drwxr-xr-x 23 0 root 4096 Feb 1 2005 var ls: .elinks: Permission denied ls: .gconf: Permission denied ls: .gconfd: Permission denied ls: .gnome: Permission denied ls: .gnome2: Permission denied ls: .gnome2_private: Permission denied .gnome-desktop: total 12 -rwx------ 1 0 root 128 Feb 16 2005 root's Home -rw-r--r-- 1 0 root 2789 Feb 16 2005 starthere.desktop -rwx------ 1 0 root 124 Feb 16 2005 Trash .gstreamer: total 4 -rw-r--r-- 1 0 root 104 Feb 1 2005 registry.xml ls: .metacity: Permission denied ls: .mozilla: Permission denied .nautilus: total 8 -rw-r--r-- 1 0 root 153 Feb 16 2005 first-time-flag drwx------ 2 0 root 4096 Feb 16 2005 metafiles ls: .ssh: Permission denied -------------------------------------------------------------------------- |
As best as I can tell, the numeric UID for root has been changed in /etc/passwd. Can you do 'grep root /etc/passwd' and post the output here?
|
Hi,
Your files/dirs seem to be owned by 0 (zero). This should have translated to root. I.e: drwxr-x--- 20 root root 4096 Sep 2 19:29 root instead of: drwxr-x--- 20 0 root 4096 Sep 2 19:29 root Looks like your root entry got messed up. Check and see if root is present in /etc/passwd. Looks like this: root:x:0:0:root:/root:/bin/bash Hope this helps. |
Reply: ALL permissions denied for root
Thanks Dave!
[root@localhost root]$ grep root /etc/passwd root:x:-1:0:root:/root:/bin/bash operator:x:11:0:operator:/root:/sbin/nologin What's the -1 mean? Is that the proglem? Root does not have permission to alter any files! So how do I fix that? |
How that ever got changed to -1 is beyond me. But -1 would make a serious mess of things. It's supposed to be 0.
|
Hi,
Only way I can come up with to cure this is to: 1) boot from a live/rescue cd, 2) mount /dev/sda2, 3) edit (mountpoint to)/etc/passwd/passwd (change -1 to 0), 4) unmount, 5) reboot. Hope this gets you going again. |
You *MIGHT* be able to boot into single user mode and have it give you UID 0.
|
When all else fails, boot a knoppix cd and modify files that way.
Go here http://www.knopper.net/knoppix/index-en.html and download a knoppix .iso and burn it. Pop it in the cd drive and reboot the system. When you arive at the knoppix desktop, it should have already found all your mount points. Then you may be able to 'vi /mnt/hd(whatever)/etc/passwd' and change that 1 to a 0. Also, what happens if you become root and type 'passwd root'? If it let's you...try changing the password. That may not do anything, but it's one of my late night '"sounds crazy enough to work" ideas that may help. |
Changing a password won't change the uid. Knoppix is a good idea, though booting as 'linux single' or 'linux init=/bin/bash' might also work well.
|
Quote:
in my experience some Knoppix versions seem to have trouble mounting LVM partitions, which are quite common on RHEL installs. |
All times are GMT -5. The time now is 10:35 PM. |