Operating System - HP-UX
1833792 Members
2547 Online
110063 Solutions
New Discussion

Login incorrect - Urgent help required.

 
SOLVED
Go to solution

Login incorrect - Urgent help required.

By mistake, I have changed the owner and group to oracle:dba to /user partition. After that I am not able to get into any login and getting 'login incorrect' error. My OS is HP-unix 11.11. unix system. I did not have any backup of OS and it is test server.

How can I change the owner and group to bin:bin to /user partition without login? Is reboot is going to help?

Please help me. Thanks in advance.

Rao
11 REPLIES 11
Pete Randall
Outstanding Contributor

Re: Login incorrect - Urgent help required.

You will need to log in as root.


Pete

Pete
Geoff Wild
Honored Contributor

Re: Login incorrect - Urgent help required.

You can not change it until you login - as Pete says - login as root - depending on how server was setup - you may have to be on the console....


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Pete Randall
Outstanding Contributor

Re: Login incorrect - Urgent help required.

You could reboot the server (since you can't log in to shut it down normally, you'll have to do a simulated power failure - i.e. unplug it) into single user mode. That would get you logged in as root. Then you can change the ownership.

Either way, whether you go through single user mode or just log in as root, the only way to fix this is to have root change the ownership of the directory.


Pete

Pete

Re: Login incorrect - Urgent help required.

When I tried to login as root at console, still I am getting login in correct and below console error message:

Open Module: Owner of the Module /usr/lib/security/libpam_unix.1 is not root.

Is it goes to single user mode, if I off the power to the server? Is it accept root login and password?
Hoang Chi Cong_1
Honored Contributor

Re: Login incorrect - Urgent help required.

Yes, you can do it.
You can power of the server. I think no trouble with Oracle database, it will recover automaticaly.

Looking for a special chance.......

Re: Login incorrect - Urgent help required.

Thanks to all for immediate response. Appreciated.
I will reboot the server today evening as Oracle database is accessed by users at present.

Rao
Geoff Wild
Honored Contributor
Solution

Re: Login incorrect - Urgent help required.

You will have to interrupt the boot sequence when it say "hit any key to continue"...

You will then have to:

bo p0
answer yes to "interact with IPL"
then, at ISL>
hpux -is

You will have to mount /usr and /users

But it sounds like this is the real isse:

/usr/lib/security/libpam_unix.1 should be owned by root:sys

Sounds like you may have chown'ed your usr tree - yikes!

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Devender Khatana
Honored Contributor

Re: Login incorrect - Urgent help required.

Hi Madhava,
Simply recycling power will not change the behavior of the system. I am supposing that your system is not configured as a trusted system. Just halt auto boot sequence at PDC Prompt. ( Press any key within 10 Sec)
Then at PDC prompt give 'boot pri' and select Y when it prompts for Interact with ISL. Now at ISL prompt give `hpux -is`

If your system is not configured as trusted system then on system console it will directly come to # prompt from where u can do the required things and then can reboot normally.

HTH,
Devender
Impossible itself mentions "I m possible"

Re: Login incorrect - Urgent help required.

To change other partitions globally, I used command chown -R oracle:dba /u*. Actually my intention change the ownership to /u01, /u02, /u03 etc partitions instead of /usr /user partitions. I realised mistake after logout.

What is the sequence (Ctrl+d, Ctrl+c) to do manual startup of OS while rebooting?
Pete Randall
Outstanding Contributor

Re: Login incorrect - Urgent help required.

As others have indicated you press any key at the 10 second prompt, enter "bo pri", "y" to interact with ISL, and then "hpux -is" to boot in single user mode, which will come up with the console logged in as root.

Have you tried doing a "su" to become root?


Pete

Pete
Bill Hassell
Honored Contributor

Re: Login incorrect - Urgent help required.

chown -R is one of the most dangerous commands you can issue, third only to chmod -R and rm -rf. The reason is that without careful attention to what you type, it can destroy the system's ability to run (as you've seen). So if the command you typed was /u* (which matches /usr) then you do indeed have a trashed system. In the /usr directory, there are dozens of different owners which are required to be correct (not all are bin:bin).

The error you're seeing about PAM is the login security which has detected a possible hacker by seeing that certain security libraries are not owned correctly. Try su but I suspect that that will also fail as 11.11 uses PAM for all authentication, so single user mode is about all you can do. Luckily, chmod is located in /sbin so in single user mode, you'll have a valid copy. Use:

/sbin/chown-R bin:bin /usr

This is about as close as you can get to a working system since there are dozens of files and directories that have different owners. Most of them are root:sys, but in /usr/bin mail and rmail need root:mail ownership, the rest og the non-bin:bin files and directories are root:sys and root:other.

When using dangerous commands, ESPECIALLY when you use pattern matching (like *), always type the command with echo in front of it:

echo chown -R /u*

What you will see is what chmod will see when you remove the echo.


Bill Hassell, sysadmin