Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
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.
|
 |
04-24-2006, 08:54 AM
|
#1
|
LQ Newbie
Registered: Mar 2006
Posts: 8
Rep:
|
connect to IP with different shell
I have a big problem. I changed the deafult shell in /etc/passwd file for root. When I want to connect the the IP with telnet or ssh, it gives no shell error from the system. Is there any possibility for the creating a connecting to system with a different shell? may be with this log on operation with root user i can change etc/passwd file. Or any other idea... Anyone can help me on this?
|
|
|
04-24-2006, 09:17 AM
|
#2
|
Senior Member
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491
Rep:
|
just use a live cd - get knoppix or what ever. then you can use vi or something to edit the /etc/passwd file.....
|
|
|
04-24-2006, 10:05 AM
|
#3
|
Senior Member
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Rep:
|
I think the command to edit the passwd file is vipw, it's some special command to do it. Otherwise, I'm not sure it'll take the changes. You might consider looking into that.
|
|
|
04-24-2006, 11:48 AM
|
#4
|
Senior Member
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491
Rep:
|
is the issue that you can't log in or that you don't know how to edit /etc/passwd?
|
|
|
04-24-2006, 04:34 PM
|
#5
|
Moderator
Registered: May 2001
Posts: 29,415
|
First of all, and you don't want to hear this now but, you should not log in remotely as root but as unprivileged user.
Furthermore shells are local to the system so there's no way I know you gonna succeed specifying one from remote. If you have any unprivved users in the wheel group, log in, su and use the -s arg and supplying any allowed shell from /etc/shells could do the trick.
|
|
|
04-25-2006, 01:01 AM
|
#6
|
LQ Newbie
Registered: Mar 2006
Posts: 8
Original Poster
Rep:
|
Yes I can't log in. I take this error code after entering the root and password.
No shell
Connection closed by foreign host.
I don't know any other users password. I think the /etc/passwd file same as this one.
root:x:0:0:Super-User:/:/sbin/sh
daemon:x:1:1::/:/sbin/noshell
bin:x:2:2::/usr/bin:/sbin/noshell
sys:x:3:3::/:
adm:x:4:4:Admin:/var/adm:/sbin/noshell
lp:x:71:8:Line Printer Admin:/usr/spool/lp:/sbin/noshell
uucp:x:5:5:uucp Admin:/usr/lib/uucp:/sbin/noshell
smmsp:x:25:25:SendMail Message Submission Program:/:/sbin/noshell
nobody:x:60001:60001:Nobody:/:/sbin/noshell
noaccess:x:60002:60002:No Access User:/:/sbin/noshell
backup:x:510:1:Account for batch backup jobs:/backup:/bin/sh
pocuser:x:311:311::/opt/home/pocuser:/bin/ksh
db2udf1:x:202:202::/opt/home/db2udf1:/bin/ksh
mqm:x:301:301::/opt/mqm:/bin/sh
emcuser:x:7001:701:EMC Main User:/opt/home/pocuser/emc:/bin/ksh
|
|
|
04-25-2006, 01:56 AM
|
#7
|
Senior Member
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491
Rep:
|
well, the fact that you don't know another user name is a problem. as you could ssh as another user and do "su", which would allow you to edit /etc/passwd.
I guess a remote ssh command wouldn't work either. But you might try it:
ssh <remote host> chsh -s <path to shell> root
if that makes sense.....
is it a host you cannot get to physically?
|
|
|
04-25-2006, 07:52 AM
|
#8
|
LQ Newbie
Registered: Mar 2006
Posts: 8
Original Poster
Rep:
|
I try the command it doesn't make any sense...
I take this error code:
root@<hostip>'s password:
Permission denied, please try again.
The root password can not be used here. I can't log in.
Is there any possibility for copying same etc/passwd file to this ip.
And I have same users in other system exacly doing the same operation for this system. Is there any possibility for finding any users password in this system?
|
|
|
04-25-2006, 08:00 AM
|
#9
|
Senior Member
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491
Rep:
|
This isn't some covert attempt to crack/comprimise this system is it?
You won't answer my question about whether you have physical access....... 
|
|
|
04-25-2006, 08:46 AM
|
#10
|
LQ Newbie
Registered: Mar 2006
Posts: 8
Original Poster
Rep:
|
I'm very sorry. I didn't see the question because of my confusion.
No I don't have any physical access.
|
|
|
04-26-2006, 12:24 AM
|
#11
|
LQ Newbie
Registered: Mar 2006
Posts: 8
Original Poster
Rep:
|
Physical access
I find a physical access for the system. I hope this should solve my problem. I'm going crazy 
|
|
|
All times are GMT -5. The time now is 09:20 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
|
|