Unix Technical Forum

Re: Doh!

This is a discussion on Re: Doh! within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> Resolved the problem. I moved everything from /sbin to my home directory which is on a different partition (one ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-12-2008, 06:22 AM
Phoenix
 
Posts: n/a
Default Re: Doh!

Resolved the problem.

I moved everything from /sbin to my home directory which is on a different
partition (one with space)
I then made a link from /sbin/tcsh to /usr/bin/tcsh and at that point I was
able to log in as root.
I then moved everything from my home directory/sbin back to /sbin and fixed
/etc/passwd


All this after a friend offered me a CDROM drive to boot from ;-)

Thanks all for the help!

Ron


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-12-2008, 06:22 AM
Ronald van Zantvoort
 
Posts: n/a
Default Re: Doh!

Well, allow me to be the first to congratulate you!

And to be the first to write that down for future notice ;-)


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-12-2008, 06:22 AM
Dave Uhring
 
Posts: n/a
Default Re: Doh!

On Fri, 15 Aug 2003 05:21:56 -0700, Phoenix wrote:

> Resolved the problem.
>
> I moved everything from /sbin to my home directory which is on a different
> partition (one with space)


A move is a copy and delete. You could not have done that as an
unprivileged user.

> I then made a link from /sbin/tcsh to /usr/bin/tcsh and at that point I was
> able to log in as root.


Which implies that you had write permission to /sbin.

drwxr-xr-x 2 root sys 1024 Aug 6 03:09 sbin

> I then moved everything from my home directory/sbin back to /sbin and fixed
> /etc/passwd


In other words you were root already and went to a lot of useless effort
;-)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-12-2008, 06:22 AM
Josh McKee
 
Posts: n/a
Default Re: Doh!

On Fri, 15 Aug 2003 05:21:56 -0700, "Phoenix" <me@here.com> wrote:

>Resolved the problem.
>
>I moved everything from /sbin to my home directory which is on a different
>partition (one with space)
>I then made a link from /sbin/tcsh to /usr/bin/tcsh and at that point I was
>able to log in as root.
>I then moved everything from my home directory/sbin back to /sbin and fixed
>/etc/passwd
>
>
>All this after a friend offered me a CDROM drive to boot from ;-)
>
>Thanks all for the help!


Could you provide more details? This doesn't make sense.

Thanks...Josh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-12-2008, 06:22 AM
Phoenix
 
Posts: n/a
Default Re: Doh!

Well, I hosed root by changing the shell entry for root in /etc/passwd from
/sbin/sh to /sbin/tcsh. Not very bright, but hey, what would you expect from
a Microsoft Certified NT Administrator??

So, I posted the "How do I fix it??" question here since I could no longer
log in as root. (invalid shell error)

With my standard user account, I was not able to fix it, couldn't use root
to fix it and the resolution given here on this forum was to boot from the
CD and fix it that way.

Although I am sure that would work really well, I do not have a CDROM drive
to do that with.

After consulting the Unix admins at work and a friend of mine as well as
some ridicule from my Unix admin friends and this list, I tried to create a
soft link (ln -s /usr/bin/tcsh /sbin/tcsh)

Problem was, the / filesystem was full so to fix that, I copied all of the
files in /sbin (the only directory I could think of to safely move) over to
my home directory (on a seperate and not full file partition) and then
removed all of the contents of /sbin. This gave me enough free space to
create the link.

Once the link was created, the /etc/passwd file now had a valid entry
(/sbin/tcsh) so I was able to su to root and fix the /etc/passwd file
correctly. After that, I deleted my link and moved the files from my home
directory back to /sbin


"Josh McKee" <jtmckee@rmac.net> wrote in message
news:f3tpjv8o7ukapp46gvl0jbihvjln51s38u@4ax.com...
> On Fri, 15 Aug 2003 05:21:56 -0700, "Phoenix" <me@here.com> wrote:
>
> >Resolved the problem.
> >
> >I moved everything from /sbin to my home directory which is on a

different
> >partition (one with space)
> >I then made a link from /sbin/tcsh to /usr/bin/tcsh and at that point I

was
> >able to log in as root.
> >I then moved everything from my home directory/sbin back to /sbin and

fixed
> >/etc/passwd
> >
> >
> >All this after a friend offered me a CDROM drive to boot from ;-)
> >
> >Thanks all for the help!

>
> Could you provide more details? This doesn't make sense.
>
> Thanks...Josh



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-12-2008, 06:22 AM
Josh McKee
 
Posts: n/a
Default Re: Doh!

On Fri, 15 Aug 2003 08:35:58 -0700, "Phoenix" <me@here.com> wrote:

>Well, I hosed root by changing the shell entry for root in /etc/passwd from
>/sbin/sh to /sbin/tcsh. Not very bright, but hey, what would you expect from
>a Microsoft Certified NT Administrator??
>
>So, I posted the "How do I fix it??" question here since I could no longer
>log in as root. (invalid shell error)
>
>With my standard user account, I was not able to fix it, couldn't use root
>to fix it and the resolution given here on this forum was to boot from the
>CD and fix it that way.
>
>Although I am sure that would work really well, I do not have a CDROM drive
>to do that with.
>
>After consulting the Unix admins at work and a friend of mine as well as
>some ridicule from my Unix admin friends and this list, I tried to create a
>soft link (ln -s /usr/bin/tcsh /sbin/tcsh)
>
>Problem was, the / filesystem was full so to fix that, I copied all of the
>files in /sbin (the only directory I could think of to safely move) over to
>my home directory (on a seperate and not full file partition) and then
>removed all of the contents of /sbin. This gave me enough free space to
>create the link.
>
>Once the link was created, the /etc/passwd file now had a valid entry
>(/sbin/tcsh) so I was able to su to root and fix the /etc/passwd file
>correctly. After that, I deleted my link and moved the files from my home
>directory back to /sbin


Could you please provide the OS (uname -a) version and the directory
listing for /sbin (ls -ld /sbin)? What you described doesn't make
sense because the default permissions on the /sbin directory would not
allow an un privileged user to do what you've described.

Josh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:30 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com