Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to telnet as root

Status
Not open for further replies.

qingbo

MIS
Nov 29, 2000
5
US
After I issued a 'chmod o-rwx' at root directory as root, I can no longer telnet as a regular user (don't laugh at what I did. I know it's dumm). It will say 'no shell'. Now I can only ftp to the site as root or regular user. The problem is I can't telnet using root ('No system console'). And I can't physically go to the site at this time. Is there anyway to change that and allow me to telnet?

It's solaris 2.6

Thanks

hehe
 
umm, yes, but you really want to turn it back straight away :)

2 ways ...

1 add a '.rhosts' file with the name of your current machine to the home directory of root on the target system and 'rlogin' to it ...

or you can modify '/etc/default/login' and comment out the 'CONSOLE' line

ftp this file to you, make the changes and ftp it back ...

(at least you didn't do what i did and accidentally modify the passwd file so that root doesn't have a valid shell :)

another way of accessing it, if you have it, is to use samba ... sparingly :)

add the /etc directory to the samba configuration (with SWAT) and then connect as root and modify the file directly ... but this is kinda a last resort.

hope some of this helps
 
I commented out the 'console' in the 'etc/default/login' file and I was able to login as root. Thanks

Now when I login as other use, it says 'ld.so.1: internal: malloc failed'.

What is that?
thanks
Qingbo
 
it can't access the library directories because you chmod'd them ...

ok ... i guess you'll want to know what they were ... sorta :)

well cd to /usr and chmod -R o+rx .

that should cure it for you :)

you'll also want to do a few other checks, but it's a safe bet that /usr is all allowed to be accessed by any user.
 
Are you using NIS on the system? If so you can add a root entry and specify the shell as /sbin/sh and then do a ypmake to update root. I had a similar problem (for a different reason :)) where I had no shell for root.
I'd changed the shell to /bin/ksh for root but on Solaris root's default shell should always be /sbin/sh. Anyway, I was able to correct the problem by doing the above and I was then able to access the server fix the problem, then comment out the root entry on my NIS mapfile and re-issue ypmake to clean up. Hope it helps.
Jon Zimmer
jon.zimmer@pf.net
The software required `Windows 95 or better', so I installed Linux.

 
no we're creating NIS now ... but didn't have it then :)

In a NIS system you should really have root specific to each machine, as this can be a security issue, and there can be a problem if the NIS screws up :)

(actually i changed the shell, by copying a linux compatible passwd file on to one of our linux boxes, and linux doesn't have /sbin/sh :)

i have some code that converts passwd+shadow on Solaris to old style single passwd files ... (aka Linux 2.0)
 
I was able to login as a regulare user by 'chmod'. Now it has this error:

'segmentation fault (out of memory)'

Anyone has experience with that?

Qingbo
 
Hi !

check if the userid has write permissions in his home directory and also if he is able to write in to /tmp
,if not then try giving write permissions , hope it would help

rajesh
;-)
 
sounds good!

except that home directories should be owned by the user, so i think its the /tmp directory ...

chmod +t /tmp
chmod a+wrx /tmp
 
Jad-

I liked your ftp approach - very creative. By the way, very early in my Unix career, I exactly edited the passwd file and changed the /sbin/sh to /bin/sh which unfortunately, /bin does not have sh. I had to boot mini-root from cd ....

Talk to you later.

Al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top