LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-19-2011, 03:20 PM   #1
susja
Member
 
Registered: May 2011
Posts: 61

Rep: Reputation: 0
Unable to run 'su' and 'sudo' after changing permissions on /etc


Hello,
I'm running rhel6 64bit. Accidentally I ran % chmod -R 777 /etc and after that I have a problem to do 'su' or 'sudo'. When I did sudo it complained that /etc/sudoers has 777 while it should be 0440. I changed that and also restored right permission for:
-rw-r--r-- 1 root root 1966 May 19 13:41 /etc/passwd
-r-------- 1 root root 1161 May 19 13:42 /etc/shadow
-r--r----- 1 root root 3746 Apr 23 01:38 /etc/sudoers
Anyway it failed to 'su'. Then I restored back permissions on files in /etc/security and /etc/sysconfig. Still can't do 'su'. Note: I could login from console as root but can't 'su' or 'sudo'.
when I do 'su' it gives error:
Password:
su: incorrect password
Could someone help with it?
Thanks.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 05-19-2011, 03:43 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,647

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
There are probably clues in /var/log/messages or /var/log/secure.

I bet it's the files in /etc/pam.d/.

Also SSH will need /etc/ssh/* permissions fixed.
 
2 members found this post helpful.
Old 05-19-2011, 10:38 PM   #3
susja
Member
 
Registered: May 2011
Posts: 61

Original Poster
Rep: Reputation: 0
AlucardZero -
thanks so much, you heads-up was very valuable and I was able to fix my problem.
Susja
 
  


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
[SOLVED] "sudo: Can't mkdir /var/run/sudo/%user%: File exists" CNBarnes Linux - Server 7 01-10-2011 04:11 PM
(Sudo) command can't run by sudo rahilmaknojia Linux - Server 8 06-25-2010 09:30 AM
changing the sudo password? SSJGoku Fedora 1 05-17-2009 06:04 PM
Unable to Run sudo due to getresuid() Not Working on CentOS 3.1 Xyrael Linux - Security 14 02-06-2008 08:29 PM
Unable to run /usr/sbin/pppd. --> Check permissions [solved] flosch Linux - Networking 0 05-05-2004 09:08 AM


All times are GMT -5. The time now is 11:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration