Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to do a mass change on all users but root in AIX for the following "password attributes":

Weeks before password reuse: 15
Password min length: 6

Can it be done, or do I need to do them one at a time? I tried to use the F6=Command button to see what it runs, but it appears to be running some sort of script and this is beyond me. Are there any other users (besides root) whose attributes I should leave unchanged?

share|improve this question
Can you copy the script shown by F6 put a copy up on pastebin? Please make sure it contains no sensitive data. Maybe we can help put it in a loop for you. (my AIX box is at 3.2) – bsd Feb 23 '12 at 23:03

There are other users besides root that are daemons (process managers) that you shouldn't change.

If all of your users are not in the same group, you could select by home directory (if they share common home). In the simplest case the following should work.

for user in $(grep "/home" /etc/passwd | cut -s -d':' -f1)
    chuser minage=15 minlen=6 $user

Always test sections of code, especially before applying a command modifying users ability to login, you may have to undo your work in a hurry if you get it wrong

Try the following first, to ensure you have a valid list of users you wish to alter

for user in $(grep "/home" /etc/passwd | cut -s -d':' -f1)
    echo $user

Try chuser minage=15 minlen=6 on your username and lsuser on your username before applying the same command to other users.

share|improve this answer
# lsuser -a minlen minage support
support minlen=8 minage=0

# chuser minage=1 minlen=6 support 

# lsuser -a minage minlen support 
support minage=1 minlen=6
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.