Operating System - HP-UX
1755702 Members
2669 Online
108837 Solutions
New Discussion юеВ

Re: Root user account disabled

 
Tan Thye Heng
New Member

Root user account disabled

Hi,

We have Unix station version 10 installed in Thailand. They changed the password of root user a few times. Now the root user account is disabled. I try to login as a single mode user to change the password back but the account is still disabled. There is no way I could activate the account now as I can't go into sam nor using the VI command to edit the /etc/passwd file.

Could someone be kind enough to advise?

Thank you.
8 REPLIES 8
Adisuria Wangsadinata_1
Honored Contributor

Re: Root user account disabled

Hi there,

Check this tread below :

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=685115

Have a good day.

Cheers,
AW
now working, next not working ... that's unix
Con O'Kelly
Honored Contributor

Re: Root user account disabled

Hi

Unfortunately you will have to reboot into single user mode.
On the console you can then reset the password.

One alternative is to check and see if you have a /.rhosts file (of course you shouldn't!!) but if you do then you can rlogin from another server as root.

Cheers
Con
Tan Thye Heng
New Member

Re: Root user account disabled

Hi,

Thank you for all the replies. I can change the password but I can't enable the root account in the single mode user so it still can't help. I check the system administrator manual, in /etc/passwd file user with an asterisk (*) in the password filed deactivates an account. The problem is in single mode user after reboot, I can't access the /etc/passwd nor issue the vi command to activate the root account. Any one has any idea using hp term command to activate account in single user mode?

Thank you.

regards,
Con O'Kelly
Honored Contributor

Re: Root user account disabled

Hi

You will need to mount /usr filesystem.

The * denotes a shadow passwordd if you are using trusted system.

If its trusted system use the following to unlock:
# /usr/lbin/modprpw -l -k root
# passwd root

Remember to mount /usr first.

Cheers
Con
Tan Thye Heng
New Member

Re: Root user account disabled

Thank you Con O'Kelly. I try it in my office on our unix. The station replies The system is not trusted. So is there way out to activate the root account for an untrusted system.



Thank you for your help.


regards,

Thye Heng
Con O'Kelly
Honored Contributor

Re: Root user account disabled

Hi

If the system is untrusted then the following command (run in single user mode)will unlock the account and reset the password:
# /sbin/passwd root

If you are still having problems then /usr/bin/vi /etc/passwd and delete the '*'.
(remember to mount /usr)

This should allow you to login without a password.

Cheers
Con
vinod_25
Valued Contributor

Re: Root user account disabled

hi

Here is a good way to create a back door to reactivate the root
account that has become disable on a trusted system

Step 1
Adding a User

SAM areas
select "Account for Users and Groups"

SAM Areas: Account for Users and Groups
select "Users"

Account for Users and Groups screen
select Actions Add...

Add a User Account screen
add user in the Login Name
admin1 or your name
select "ok"

Set User Password screen
enter password for user and select ok
user is added to the system

exit SAM
select file ,then exit sam

Step 2
Giving a user SAM Privileges for "Account for Users and Groups"

sam -r

Restricted SAM Builder screen and Load Privileges dialog box pops up
Highlight the user that you want to give Privileges too
select "ok"

Notice on the Restricted SAM Builder screen you will see
Privileges for user : the user you selected

Restricted SAM Builder screen
select Action --Disable all
highlight "Account for Users and Groups"
select Actions -- Enable
select Actions -- Save Privileges
a Save Privileges dialog box pops up - select ok

Exit SAM
file -- exit sam

Now the User you select has SAM Privileges for "Account for Users and Groups"
and will be able to reactivate disabled Accounts

When the root Account becomes disabled

login as your Restricted SAM user
/usr/sbin/sam
select the only option "Account for Users and Groups" with enter key
highlight "Users"
select with the enter key
highlight root user
select Actions -- Reactivate
a dialog box pop up to tell you why it was disable
select yes to reactivate

Exit SAM
file -- Exit


Regards

Vinod K
Tan Thye Heng
New Member

Re: Root user account disabled

Hi Guys,

Thank you for all the kind help. My colleague managed to enable the root account by sam in single user mode, the * in the /usr/passwd file of root user could not be deleted.


Once again Thank you guys. I will close this thread.

Regards,

Thye Heng