LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-07-2011, 06:18 AM   #1
trancephorm
Member
 
Registered: Nov 2004
Posts: 34

Rep: Reputation: 0
Exclamation Can't su to root, after issuing chmod -s /bin/su


When I try to issue "su -", I get "su: Authentication failure", and I'm 100% sure password I enter is ok.

I think it started to happen after I issued
chmod +s /usr/bin/screen
chmod 755 /usr/bin/screen
which I believe is unrelated to this problem, and,
chmod -s /bin/su (-s by mistake)
chmod 755 /bin/su
which most probably made the whole mess...

this is not the part of the problem I believe but here's some background why I did that... when trying to make possible for screen sessions to be started automatically on boot under non-root account, I entered something like "su - username -c "/usr/bin/screen -dmS screenname ./executable-file"" in bootmisc.sh, but I was getting "must run suid root for multiuser support", so I tried to fix it, and now I can't login to root account no way

Is there any way to heal the situation?

Last edited by trancephorm; 03-07-2011 at 06:39 AM.
 
Old 03-07-2011, 07:14 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

It looks like the permissions on /bin/su are not correct, which you did yourself with the chmod 755 /bin/su statement.

Restore the original permissions (as root):
Code:
chmod 4755 /bin/su
An ls -l on that file should now show:

-rwsr-xr-x 1 root root 34024 Feb 11 21:54 /bin/su

instead of

-rwxr-xr-x 1 root root 32024 Feb 11 21:54 /bin/su

Hope this helps.
 
Old 03-07-2011, 07:24 AM   #3
trancephorm
Member
 
Registered: Nov 2004
Posts: 34

Original Poster
Rep: Reputation: 0
Thanks, I guess I must do it from some live bootable CD? My current user is not privileged enough for chmod 4777 /bin/su ..
 
Old 03-07-2011, 07:42 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Using a live cd should work.
 
Old 03-08-2011, 02:23 AM   #5
trancephorm
Member
 
Registered: Nov 2004
Posts: 34

Original Poster
Rep: Reputation: 0
Thanks for feedback, it's solved now...
 
Old 03-08-2011, 04:27 AM   #6
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
How do you login? You could have used "CTRL-ALT-F1" to get a text screen and login there as root when you have a GUI with automatic login to your user account by default. Back with "ALT-F7".
 
  


Reply



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
chmod u+x /usr/bin/lptout does not work for not su - user cwc Fedora 3 08-03-2010 12:34 AM
Apache: difference between chmod 644 and chmod 666 and chmod 600 for output/txt/dat? frenchn00b Programming 6 04-22-2009 01:10 PM
NFS Root setup - can't log in as root after CHMOD ? gallwapa Linux - General 1 04-02-2007 04:31 AM
chmod a+x jre-1_5_0-linux-i586-rpm.bin chemichael Fedora 4 09-24-2005 10:23 AM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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

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
Open Source Consulting | Domain Registration