LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-05-2004, 05:00 AM   #1
dzz
LQ Newbie
 
Registered: Nov 2004
Distribution: rh9
Posts: 2

Rep: Reputation: 0
can't "su -" to root after changing /etc/passwd


after blocking root logins in ssh and changing shell for root in /etc/passwd to /sbin/nologin, i can't "su -" from a user to root, nor login as root.

server is rh9 and is located across the country from me. i can still ssh in as a user.

the message i get when i try to su - is "This account is currently not available".

anyone have any ideas?
thanks
 
Old 11-05-2004, 07:44 AM   #2
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
as you have probably worked out, its dangerous to change root login settings when you need root to change them back !!!

anyways.. i see 2 options, boot a recueCD and change the passwd file back...
either go there yourself, or get someone else who lives there to do it for you.

OR.......
how secure is the machine ?
you installed the system right ? with your knoledge of the system, maybe you could "hack" it.
find a privilage esculation exploit in your system, and exploit to to gain root access and change the paswd file back.

In the future, if you need to do such a thing, backup the origonal, and write a script that will run as root, and restore the system to its origonal state at midnight.

then you can change your settings, test the new settings, and if the worst happens and you lock yourself out, atleast you will be let back in at midnight..

and you test the new setitngs and they are working as expected, kill the scripts PID.
 
Old 11-05-2004, 01:39 PM   #3
dzz
LQ Newbie
 
Registered: Nov 2004
Distribution: rh9
Posts: 2

Original Poster
Rep: Reputation: 0
managed to get it to work

thank you for your prompt reply i just found a third way to get back in as root: "su --shell=/bin/bash -" from a user account.
immediately, i went back to fix the root line in /etc/passwd but then thought - this could be a security advantage - i wouldn't mind specifying the shell in su, but people who don't know this won't be able to get in as root, even if they knew the password.

diyan
 
  


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
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 04:08 PM
Mysql: Any way to reset "root" passwd??? paulsm4 Linux - Software 5 03-08-2007 09:04 PM
how do I get around the "submit passwd" prompt in ubuntu even if I use "sudo"? t3gah Linux - Distributions 1 02-22-2005 04:42 PM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 03:28 PM
Changing PS1 "on the fly" for root gandalf2041 Linux - General 1 11-22-2003 01:37 PM

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

All times are GMT -5. The time now is 05:39 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
Open Source Consulting | Domain Registration