logs archiveIRC Archive / Freenode / #centos / 2006 / August / 19 / 4
jbalint
are you using IP or name?
nphase
tried both
jbalint
is there a /etc/hosts or dns mapping back to your host?
nphase
nope
jbalint
try adding that
nphase
jbalint: what basically happened is the server got compromised
i can't use cpanel transfer unless sshd works
hence the question way earlier about setting up a new one
jbalint
did you take it off the internet?
nphase
the server?
no, unfortunately i can't do that because of client sites on it
jbalint
yeah
         

nphase
:-/
LuvRedheads
you really need to take this up with cpanel
nphase
well, i need sshd to work
thats what i need to do
its not really cpanel's fault
i SHOULD take it up with mambo
hah
anyways..
okay great
www.openssh.com loading for anyone?
jbalint
yes, it works fine
nphase
ugh
okay
i think the wireless here is shot
VenumX
hi i accidently deleted root, is there a way to restore the user root through webmin?
jbalint
haha, probably not. is it gone from the password file?
Sneaky_Bastard
how's that ?
you can't just delete root !
WTF?
dtm
VenumX: do you already have a root prompt open?
or something sudo capable?
VenumX: why are you asking, instead of trying it?
i assume you already have a functional webmin
VenumX
dtm: yeah webmin works, but i edited /etc/shadow for my venumx user, but when i did i must have accidently deleted root from it, and so i saved it, obviously not thinking that root was edited
and whne i got out
i couldnt log into ftp, ssh, nothing
webmind works, but not for root
i have to run the commands for another user
dtm
VenumX: and you have no other privileged webmin users?
VenumX
umm
admin.dtc is my login for webmin
does that have default root
priveldges
dtm
how would i know?
why are you asking instead of trying it
VenumX
haha
dtm: i can do anything except run process' under root
jbalint
bye
dtm
does that mean it can't add users?
VenumX
dtm: yeah
dtm
VenumX: you could get to the console and reboot to runlevel 1.
that'll give you a root prompt without logging in.
because uid0 is built in to the kernel
VenumX
im renting the server from a server hosting company
so all i have is webmin
so i have to make sure if i do something
i can get back into webmin
dtm
well i'm pretty sure that it'll boot back up properly but i've never heard of anyone doing this so i don't know.
         

VenumX
so what ur saying is
if i reboot the server
dtm
because the kernel knows uid0 and it executes /sbin/init which then executes everything else upon boot.
VenumX
it should put root back in
>
dtm
uid 0 exists even without root
no, it's not
if it's a remote system with no remote console server then you'd need a person standing there
you should have done your playing on a local test system, like qemu
and then only published the results to this host
VenumX
well i was told by someone on here to edit that file, all i was editing was /sbin/soemthing to /sbin/bash so that i could login to ftp
and it seems like i deleted root from it
dtm
mmhmm
well you should have apparently done it via webmin, which would have sanity checked it
before permitted an erroneous change
or run 'vipw' instead of a regular text editr
so do you have a person who can stand at the console upon its boot and know how to enter runlevel 1 and edit that file for you? [y/n]
it'd take a minimally knowledgeable person about 3 minutes
VenumX
would something like
echo root:$1$55886783$4TWTJUfLqHepqiKmyXzzx/:13378:0:9999:7::: >> /etc/passwd
do it?
dtm
something LIKE that would work if you already had a root prompt which you said you didn't.
if you could run that command, you could just run the text editor again.
VenumX
there is a command shell
that might work
dtm
oh there is?
as root?
VenumX
in webmin
i dunno
dtm
:-I
keep poking in webmin for a while.
VenumX
k
what baout
echo root:$1$55886783$4TWTJUfLqHepqiKmyXzzx/:13378:0:9999:7::: >> /etc/shadow
dtm
no that's the /etc/passwd format which is not what you need. you need /etc/shadow
you said that you have no administrative user in webmin.
thus the point is moot
are you still certain of that?
VenumX
no
haha
dtm
well.
VenumX
well
if i had root
what should i put for the shadow file
dtm
try logging in as root in webmin.
VenumX
for root
dtm
wait i'm smokin crack. you were right the second time. that was the /etc/shadow syntax, not the /etc/passwd syntax.
VenumX
ok so if i do
dtm
and this should be atop your /etc/passwd file:
root:x:0:0:root:/root:/bin/bash
not necessarily atop but that's where it is by default
VenumX
dtm: so if i did echo root:x:0:0:root:/root:/bin/bash >> /etc/passwd
dtm
you said you broke /etc/shadow, not /etc/passwd
VenumX
and echo root:$1$55886783$4TWTJUfLqHepqiKmyXzzx/:13378:0:9999:7::: >> /etc/shadow
dtm
and you haven't answered the question of whether any of this is possible.
zcat
VenumX, you root password is "test"? :)
dtm
:-o
lawl
fired
VenumX
my root password is test?
why u think that?
zcat
VenumX, i ran john on it. took 2 seconds.
VenumX
haha
yeah i just set it to that
just now u did
?
now i think i have root priveledges
for root
now how to i fix ssh
lol
dtm
what?
you think?
VenumX
haha
no idea
why its not working
dtm
why'd you say it then?
VenumX
oh
i think because now i can do the vi /etc/shadow file command
from user root
in process
and i wasnt able to do taht before
dtm
how'd you get "user root"
and what did you do to enable this if you couldn't before?
zcat
VenumX, i hope only your own site is on that server :)
dtm
VenumX: run this ----> echo $UID
and tell me whether it is 0 or not
rado2
lol
VenumX
yeah
it is
dtm
well then that's root.
VenumX
good
« prev 1 2 3 4 5 6 7 8 9 10 next »