Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-17-2004, 02:08 PM
|
#1
|
Member
Registered: Jul 2003
Posts: 40
Rep:
|
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
|
|
|
06-17-2004, 02:11 PM
|
#2
|
Senior Member
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070
Rep:
|
chown -R root directory_name
If you changed the group ownership also make that
chown -R root:root directory_name
|
|
|
06-17-2004, 04:11 PM
|
#3
|
Member
Registered: Jul 2003
Posts: 40
Original Poster
Rep:
|
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 ?
|
|
|
06-17-2004, 04:30 PM
|
#4
|
Senior Member
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070
Rep:
|
1) Just to make sure, you are root when doing this?
2) What is the output of
ls -l /bin/su
|
|
|
06-17-2004, 07:00 PM
|
#5
|
Member
Registered: Jul 2003
Posts: 40
Original Poster
Rep:
|
Quote:
Originally posted by darthtux
1) Just to make sure, you are root when doing this?
2) What is the output of
ls -l /bin/su
|
1). how can i be root without doing su ?, i can only enter the root password when xwindow prompts
2) the output of ls -l /bin/su is
-rwxrwxrwx 1 glacier1985 root 104622 May 4 12:25 /bin/su
|
|
|
06-17-2004, 07:17 PM
|
#6
|
Senior Member
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070
Rep:
|
Hit
ctr+alt+f2
and login as root
|
|
|
06-17-2004, 07:41 PM
|
#7
|
Member
Registered: Jul 2003
Posts: 40
Original Poster
Rep:
|
hmm... no luck, gives the same error message.
|
|
|
06-17-2004, 07:51 PM
|
#8
|
Member
Registered: Jul 2003
Posts: 40
Original Poster
Rep:
|
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]$
|
|
|
06-17-2004, 08:24 PM
|
#9
|
Member
Registered: Jan 2004
Location: Cebu City, Philippines
Distribution: Slackware 10,Gentoo 2005.1,LFS
Posts: 92
Rep:
|
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
Last edited by d00msweek; 06-17-2004 at 08:31 PM.
|
|
|
06-17-2004, 08:28 PM
|
#10
|
Senior Member
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070
Rep:
|
On my su it has the suid bit set. Try
chmod u+s /bin/su
|
|
|
06-17-2004, 09:20 PM
|
#11
|
Member
Registered: Jul 2003
Posts: 40
Original Poster
Rep:
|
good, it's working now thank you so much
|
|
|
All times are GMT -5. The time now is 11:40 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|