Operating System - HP-UX
1833780 Members
2429 Online
110063 Solutions
New Discussion

How to recover the files' owner and group

 
fanyong
Occasional Contributor

How to recover the files' owner and group

I run this command

# chown -R data:data /usr

when telnet to this system ,it told me
"Unable to set uid/gid"
and close this Connection.

How to correct owner and group of /usr?

9 REPLIES 9
fanyong
Occasional Contributor

Re: How to recover the files' owner and group

add:

#uname -a
HP-UX legendn4 B.11.00 U 9000/800 631349303 unlimited-user license
Animesh Chakraborty
Honored Contributor

Re: How to recover the files' owner and group

Hi ,
boot the system in single user mode.
mount /usr
then try to change owener:group as below

10 bin bin 2048 Mar 31 2001 lbin
35 bin bin 8192 Sep 14 17:21 lib
8 bin bin 1024 Apr 6 2001 local
2 root root 96 Mar 31 2001 lost+found
1 root sys 9 Mar 31 2001 mail -> /var/mail
1 root sys 14 Mar 31 2001 man -> /usr/share/man
1 root sys 13 Mar 31 2001 netls -> /var/opt/ifor
7 bin bin 1024 Mar 31 2001 newconfig
1 root sys 9 Mar 31 2001 news -> /var/news
4 bin bin 96 Mar 31 2001 obam
6 bin bin 1024 Mar 31 2001 old
1 root sys 13 Mar 31 2001 preserve -> /var/prese

1 root sys 18 Mar 31 2001 pub -> /usr/share/lib/

6 bin bin 96 Mar 31 2001 sam
8 bin bin 7168 Apr 1 2001 sbin
6 bin bin 96 Mar 31 2001 share
1 root sys 10 Mar 31 2001 spool -> /var/spool
1 root sys 8 Mar 31 2001 tmp -> /var/tmp
8 bin bin 1024 Mar 31 2001 tsm
4 bin bin 96 Mar 31 2001 vue

Animesh
Did you take a backup?
Ravi_8
Honored Contributor

Re: How to recover the files' owner and group

Hi,
you have committed a big mistake. some of the files/directories /usr are owned by root/bin/system. You need to change the ownership of the files by looking at the another system which works fine. Or if you have ignite backup just restore from backup. if you want only telnet to work at present just do # chown bin:bin /usr/bin/telnet
never give up
Michael Tully
Honored Contributor

Re: How to recover the files' owner and group

Hi,

You should not have run a chown data:data
on /usr. There are many directories that
have files that have ownership crucial to
the system. looks like you have flattened
the shells so that you can't login normally.
You can do one of two things, if you are
logged in already check with another system
for it's directory structure or restore it
from backup tape.
-Michael
Anyone for a Mutiny ?
fanyong
Occasional Contributor

Re: How to recover the files' owner and group

Thanks,

But there are lots of file under the /usr.

I have change some of them and the root user can telnet in.
However others given the mssage
"Unable to set uid/gid"
Santosh Nair_1
Honored Contributor

Re: How to recover the files' owner and group

Here is a link to a similar problem, but in that case, the user changed permissions from / down:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x8892abe92dabd5118ff10090279cd0f9,00.html

I'm trying to hunt down Adreas' script in the mean time.

-Santosh
Life is what's happening while you're busy making other plans
James R. Ferguson
Acclaimed Contributor

Re: How to recover the files' owner and group

Hi:

Over a year ago, Andreas Voss developed a script to rectify a similar problem. Here is his original post:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xa7ef6c96588ad4118fef0090279cd0f9,00.html

Regards!

...JRF...
Carlos Fernandez Riera
Honored Contributor

Re: How to recover the files' owner and group

All systems ( UNIXs) have their own software installer, and usualy a revorever.


in HP-UX this is swverify - man 1m swverify-. Check it.
unsupported
fanyong
Occasional Contributor

Re: How to recover the files' owner and group

I had change the ownership of the files by looking at the another system which works fine.