default on /etc/security/passwd of flags

Hi All,

On /etc/security/passwd, I want a default of "flags =" on every entry on the userid.

Like

>tail -10 /etc/security/passwd
perdov:
        password = xxccddsp.
        lastupdate = 1250109948
        flags =       

jong:
        password = rtyderferf
        lastupdate = 1257348231
        flags =       
>  

How do I make that a default so that new userid I will have that param? And can root userid have this param or just the regular userid?

Thanks for any comment you may add.

Hi Itik ,

When you add user you will have no flags assigned to that user.
But if you add password or change password for this user as root that user will get flag "admchg". This flag will force user on his first login to change that password. If you want to delete that flag you can do it with pwdadm -c user_name (as root).

For root you can use flag "nocheck". Flag "admchg" is not added even you change root password and flag "admin" is implemented automatically.

You can have a look on man pwdadm or here pSeries and AIX Information Center

I would go for the default: stanza in /etc/security/user and add "flag =" there and try out if it works for you.

I think is not working that way.
I added flag = to /usr/lib/security/mkuser.default and as well to
/etc/security/user and is not working. This "flag=" is added to the /etc/security/passwd after password is created for user.

Oic, I misread. Thought he was concerning /etc/security/user. My bad, ty.