Changing root password


 
Thread Tools Search this Thread
Operating Systems AIX Changing root password
# 1  
Old 06-17-2015
Changing root password

I want to change the root password on an AIX box. What is the best method to do this so i do not get myself locked out. When I do i search the results come up for resetting the password if you are locked out.

Thanks
# 2  
Old 06-17-2015
I'm not an AIX expert but the generic Unix answer is:

Login as root to give yourself the rights to do this

Use the passwd command like you would to change any user's password
Code:
# passwd <userid?>

but specify your own userid, thus
Code:
# passwd root

then follow the prompts.
# 3  
Old 06-17-2015
Can I log in as root change the password then stay logged in and open another session to test. That way if it fails I am still in first session to try and change it again.
# 4  
Old 06-17-2015
Sure thing.
# 5  
Old 06-17-2015
If you are logged in as the user who's password you want to change, you don't need a username operand, just the command:
Code:
passwd

It will prompt you through the steps needed to change your own password.

To keep from getting locked out, make the new password you create something that you can remember.
# 6  
Old 06-20-2015
Notice that changing the password from one user account for any other user sets the "ADMCHANGE" in /etc/security/passwd and the user will be prompted to change his password (again) the next time the user logs on.

To prevent this you can reset the flag by using the pwdadm command:

Code:
root # passwd user
passwd: *******
repeat: *******

root # pwdadm -c user

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Can a root role change the root password in Solaris 10?

i do not have root on a solairs 10 server , however i do have the root role, i was wondering if I can change the root password as a a role with the passwd command? I have not tried yet. and do i have to use the # chgkey -p afterwards? i need to patch is why i am asking. thanks (1 Reply)
Discussion started by: goya
1 Replies

2. Shell Programming and Scripting

Problem with feeding password while changing to root user

i want to change user to "root" from another user while running a script. how can i automatically feed the password? for example, i want to write a script say "script.sh"... it will first run the command "p" as mhmn user, and then it will change the user to "root" by using "su - root" command. at... (1 Reply)
Discussion started by: mhmn
1 Replies

3. Solaris

Lost Root Password on VXVM Encapsulated Root Disk

Hi All Hope it's okay to post on this sub-forum, couldn't find a better place I've got a 480R running solaris 8 with veritas volume manager managing all filesystems, including an encapsulated root disk (I believe the root disk is encapsulated as one of the root mirror disks has an entry under... (1 Reply)
Discussion started by: sunnyd76
1 Replies

4. UNIX for Dummies Questions & Answers

Permission denied when changing root password after reset

I have a Solaris 10 machine that I didn't know the root password to so I went into single user mode and removed the password from the shadow file and rebooted and I am able to login with no password now. But my problem is that when I try to change the root password from no password to something... (0 Replies)
Discussion started by: darkone_d1_2000
0 Replies

5. Solaris

changing user password as root on LDAP client SOl10/u7

I'm fairly inexperienced with LDAP and DSEE so to build my skills I installed directory server in the global zone of my Sol 10/u7 machine and created a zone to use as a client. For some reason when I try to change a users password as root (in the client zone) with passwd -r ldap I am prompted for... (1 Reply)
Discussion started by: ilikecows
1 Replies

6. Solaris

Solaris 8 - Asks for current root password when trying to change root password.

Hello All, I have several solaris boxes running Solaris 8. When changing root passwords on them, all will simply ask for the new root password to change and of course to re-type the new password. One of the systems however asks for the existing root password before it will display the new password... (8 Replies)
Discussion started by: tferrazz
8 Replies

7. Shell Programming and Scripting

how to change root password using shell script with standard password

Hi Friends. I am new to scripting now i want to change the root password using the script with standard password. which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies

8. UNIX for Dummies Questions & Answers

I need it to prompt me for a root password, so I don't have to log as root

Hi folks, I'm trying to install a program, and I want to place some of the executables into /usr/bin so that they can be executed from any folder on the computer. I've been giveng the root password, but told never to log in directly as root. Instead, I can wait for a password prompt. However, I... (2 Replies)
Discussion started by: lunchtime
2 Replies

9. HP-UX

Changing root password

I have two unix system A and B with same configuration. I can use remsh from A system login to B system as root, but when I want to change the root password of B system, it ask me the old password, but i forgot it. However, is it possible to change the B system root password? :( Thanks a lot (3 Replies)
Discussion started by: zetadhell
3 Replies

10. Linux

how to access root priveliges if root password is lost

wish to know how to access root password it root password is forgotten in linux (1 Reply)
Discussion started by: wojtyla
1 Replies
Login or Register to Ask a Question