Chown -R on /usr

Chown -R on /usr

Post by Saheed Akhta » Fri, 31 Aug 2001 20:30:19



Hi all,

One of our operators has done the following:

chown -R <a.user>  /usr on a solaris 2.6 system.

If try to telnet get a varitey of messages:

rlogin host
rlogind: could not grant slave pty.
Connection closed.
tpclient:talis}rlogin merlot
fcntl F_SETOWN: Connection reset by peer
                                        Connection closed.
tpclient:talis}telnet host
Trying xx.xx.xx.xx...
Connected to merlot.xx.xx.xx.
Escape character is '^]'.
telnetd: could not grant slave pty.
Connection closed by foreign host.
tphost:}

Note the user is a non-privilaged user

Help would be appreciated

 
 
 

Chown -R on /usr

Post by Casper H.S. Dik - Network Security Engine » Fri, 31 Aug 2001 21:05:05


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>One of our operators has done the following:
>chown -R <a.user>  /usr on a solaris 2.6 system.

That gives you an interesting bit of trouble.

Quote:>If try to telnet get a varitey of messages:
>rlogin host
>rlogind: could not grant slave pty.
>Connection closed.

Even though they're run as root, some set-uid applications
(notably /usr/lib/pt_chmod) now fail because they're set-uid
some other user and run with that user's euid.

Quote:>Escape character is '^]'.
>telnetd: could not grant slave pty.
>Connection closed by foreign host.
>tphost:}
>Note the user is a non-privilaged user

Try singel user boot and run "pkgchk -f" or login using rexec:

telnet host exec

You'll get an interactive session but w/o a terminal.

(Since root only processes are involved and no-setuid executables
this may still work, though PAM has a tendency to fail in this situation)

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

Chown -R on /usr

Post by caiu » Fri, 31 Aug 2001 22:10:34


First of all kill -9  your operator, then you have another system running
solaris 2.6 look at /usr directory and check differences, u can restore /usr
directory by hand but it's too long, or u can tar /usr of the second system
and restore it on the first system.
then check if your operator is still alive!!!
Quote:> Hi all,

> One of our operators has done the following:

> chown -R <a.user>  /usr on a solaris 2.6 system.

> If try to telnet get a varitey of messages:

> rlogin host
> rlogind: could not grant slave pty.
> Connection closed.
> tpclient:talis}rlogin merlot
> fcntl F_SETOWN: Connection reset by peer
>                                         Connection closed.
> tpclient:talis}telnet host
> Trying xx.xx.xx.xx...
> Connected to merlot.xx.xx.xx.
> Escape character is '^]'.
> telnetd: could not grant slave pty.
> Connection closed by foreign host.
> tphost:}

> Note the user is a non-privilaged user

> Help would be appreciated

 
 
 

Chown -R on /usr

Post by Stefan Berglu » Sat, 01 Sep 2001 23:16:49



>> One of our operators has done the following:

>> chown -R <a.user>  /usr on a solaris 2.6 system.
> First of all kill -9  your operator,

Good start...

Quote:> then you have another system running solaris 2.6 look at /usr
> directory and check differences, u can restore /usr directory by hand
> but it's too long, or u can tar /usr of the second system and restore
> it on the first system.

This is more work than is needed, check out pkgchk and
/var/sadm/install/contents

Quote:> then check if your operator is still alive!!!

If so he must be a zombie and you will have to kill his parents so the
grim reaper can get him... ;)
OTOH he was certainly <defunct> to begin with. :D

--
                        /Stefan

Life - the ultimate practical joke

 
 
 

Chown -R on /usr

Post by Mark » Sun, 02 Sep 2001 00:48:45



Quote:> Hi all,

> One of our operators has done the following:

Hmmm... Ive used that excuse before.... :-)
 
 
 

1. chown & chgrp of /usr/bin

I inadvertantly did a chown bin *
                and a chgrp bin *

while in /usr/bin

Therefore I clobbered the 'correct' ownerships for various files.

I have a duplicate system, and can do a file by file comparison to see
who *should* own any given files, but is there an easier way ?

BTW, I *thought* I was in /usr/local/bin ... oops
________________________________________________________________________________
  Jim Pazarena                    phone: (250) 559-4444
  Box 550 - 405 2nd Avenue          fax: (250) 559-8404

  CANADA   V0T 1S0                business name: qcislands net

2. Using ext3 for /

3. Chown: Can non-root user chown?

4. Configured to boot to the X Window System but getting these messages

5. chown on AIX != chown on Linux!!!!!!

6. Parallel computing

7. /usr/bin/ls /usr/ucb/ls /usr/local/bin/ls

8. Sendmail doesn't know about our new hostname

9. /usr/usr -> /usr ????

10. Consequences of moving /usr/dt, /usr/java1.1, /usr/share

11. Release 5.0 (root@hollin.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC)

12. diff. between /usr/vac/bin/xlc & /usr/bin/xlc

13. /usr/bin/mail vs. /usr/ucb/mail