LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 03-24-2008, 06:51 AM   #1
ks.sundarrajan
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Rep: Reputation: 0
Cannot login as root


Hi,
I am unable to login as root. As a normal user if i try su command, it gives the following error:

su: cannot set groups: Operation not permitted

I found that the command ls -ll gives:

-rwxrwxrwx 1 root root 24060 Mar 22 2007 /bin/su

but it must be -rwsr-xr-x

How do i do that without the root login.

Thanks in advance.
 
Old 03-24-2008, 07:26 AM   #2
arochester
Member
 
Registered: May 2006
Distribution: Debian
Posts: 601

Rep: Reputation: 96
What distro are you using?
 
Old 03-24-2008, 08:33 AM   #3
ks.sundarrajan
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Cannot login as root

My gnome got crashed. Now i am using kde. Some of the file permissions have automatically changed. I need to fix them. For that i need to login as root. My kde working well with no problems except the root login part.
I am using Centos 5, KDE desktop

Linux <hostname> 2.6.18-53.1.14.el5 #1 SMP Wed Mar 5 11:36:49 EST 2008 i686 i686 i386 GNU/Linux
 
Old 03-24-2008, 10:32 AM   #4
bryanlee1981
LQ Newbie
 
Registered: Mar 2008
Location: Mobile, Alabama
Distribution: Ubuntu Karmic, Suse 11.1
Posts: 14

Rep: Reputation: 0
What distro, as in Ubuntu, Mandriva, etc.
 
Old 03-24-2008, 01:28 PM   #5
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
Try

su -

May be this will help.

http://www.linuxtopia.org/online_boo...5_ch17s17.html
 
Old 03-25-2008, 12:31 AM   #6
ks.sundarrajan
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Cannot login as root

This probelm is due to change of permissions in the bin directory. If i could some how restore the permissions, i will be able to login as root.
Any idea about rescue mode?

I am a real newb to linux. Terms like distro are new to me..
All i know is centos 5 is a red hat el5 ...

I am really sorry for not able to give u enough info.

both su and su - result in the same err.

Last edited by ks.sundarrajan; 03-25-2008 at 12:37 AM.
 
Old 03-25-2008, 12:52 AM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Unfortunately you may need to reinstall CentOS. Is that going to be a problem for you if that's the case?
 
Old 03-25-2008, 12:56 AM   #8
ks.sundarrajan
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Cannot login as root

Reinstalling isn't a problem for me. I have all the data i need as backup. Only thing is, this gnome crash happend on my other machine also. I just want to reinstall gnome only. If my root login works fine, i would like to stay in kde only.
 
Old 03-25-2008, 02:16 AM   #9
goosygeek
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Rep: Reputation: 0
changing the permission!

try

#chmod 4555 /bin/su

This will change the permission of su directory to

-r-sr-xr-x

I think that will do.. Bcz, we have nothing to write on the /bin/su file.

all the best

With Regards,

GoosyGeek
 
Old 03-25-2008, 03:42 AM   #10
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 37
Quote:
Originally Posted by goosygeek View Post
try

#chmod 4555 /bin/su

This will change the permission of su directory to

-r-sr-xr-x

I think that will do.. Bcz, we have nothing to write on the /bin/su file.

all the best

With Regards,

GoosyGeek
As far my knowledge as he cant login as root so as user he won't be able to run the chmod commands.

Why not try linux rescue mode for fixing this problem or can even try the above commands from rescue mode for su permission.
 
Old 03-25-2008, 03:50 AM   #11
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'm rather assuming that this won't be the only permission change that's happened. Do you know if there have been many changes?
 
Old 03-25-2008, 03:56 AM   #12
LaurelRaven
LQ Newbie
 
Registered: Mar 2008
Location: California
Distribution: FreeBSD/CentOS/Ubuntu/Gentoo
Posts: 15

Rep: Reputation: 0
If you cannot login as root, then the best thing to do, in my opinion, is to use a rescue CD or LiveCD. If you already have a LiveCD laying around, that will probably work fine. Otherwise, a good, yet small, rescue CD that looks pretty promising is found at http://www.sysresccd.org/Main_Page

Download and burn this to a CD if that is possible, then boot from it. Once you are booted, you can mount your root partition by simply making a temporary folder (mkdir [FOLDER_NAME]) then mounting the partition root (/) is stored on ("mount /dev/hda1 /mnt/root", for example, replacing "hda1" with your root partition and "/mnt/root" with the folder you created).

Typical rescue CDs will boot automatically as root, while LiveCDs might not, though LiveCDs will usually let you run "sudo su" to switch to root.

Okay, once you have your root partition mounted, all you have to do is issue the command to change the permissions of /bin/su, which will look something like this:

#chmod 4755 /mnt/root/bin/su

Once done, all you have to do is reboot and give it a try...I think it will work after that, though.
 
Old 03-25-2008, 05:10 AM   #13
ks.sundarrajan
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Hi,
I Thank every one for their support.

I tried the rescue mode and it worked fine in a terminal. I was able to run the su command. But then, when I rebooted my kde also get crashed. My user account was also deleted. May be i made some mistake during rescue mode. I had no other choice except to reinstall the OS.

Thanks again for ur effort.

Regards,
Sundar
 
Old 03-25-2008, 05:39 AM   #14
sridhar_dct3
Member
 
Registered: May 2007
Location: india,chennai
Distribution: debian,ubuntu linux
Posts: 30

Rep: Reputation: 15
if you are using grub as boot loader, you can pass init=/bin/bash in grub menu which will directly get into root terminal.

Anyway you re-installed, it's too late.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 05:27 PM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 09:28 AM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 04:44 AM
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 12:39 PM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-06-2004 12:40 AM


All times are GMT -5. The time now is 11:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration