how to i change file owner back to root ?
couple days ago, i have accentally changed /etc, /bin folders -R to user glacier1985
now i find out htat i can not use su command any more it gives su: cannot set groups: Operation not permitted so i just wanna know how do i change everything back to file owner root again thank you all in advance |
chown -R root directory_name
If you changed the group ownership also make that chown -R root:root directory_name |
hmm... i tried it and it gives me this error message:
chown: changing ownership of `/bin/su': Operation not permitted but when do su it gives su: cannot set groups: Operation not permitted so i am kinda stuck. any ideas ? |
1) Just to make sure, you are root when doing this?
2) What is the output of ls -l /bin/su |
Quote:
2) the output of ls -l /bin/su is -rwxrwxrwx 1 glacier1985 root 104622 May 4 12:25 /bin/su |
Hit
ctr+alt+f2 and login as root |
hmm... no luck, gives the same error message.
|
holy sh*t after i did chown -R root /bin /etc i got these errors and i am sure that the password i enter is correct
[glacier1985@localhost glacier1985]$ su Password: su: incorrect password [glacier1985@localhost glacier1985]$ |
maybe you forgot your password ?
just log in as root and chown -R root /bin && chown -R root /etc if you really forgot your root password ( i dont know why someone would forgot their password ) this might help : http://www.desktop-linux.net/root-password.htmRoot Password Recovery Guide |
On my su it has the suid bit set. Try
chmod u+s /bin/su |
good, it's working now thank you so much
|
All times are GMT -5. The time now is 12:28 AM. |