AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
Expand all | Collapse all

set user passwd

  • 1.  set user passwd

    Posted Tue December 16, 2014 06:06 AM

    Originally posted by: tomislak


    Hi,

    we would like to automate user creation on new lpars. This would need to be automated for all party ( not only aix admins, but also for users which use thon ais users created). By hand this is as follows:

    - create user ( from smit or useradd )

    - set initial passwd ( passwd user_name )

    - pwdadm -c user_name

    - edit /etc/security/passwd stanza with cripted password from some existing host

    We would like to automate this, All is clear but last one. How to edit file from script?

    Here is a exsample, I need to change red string with similar string:

     
    oracle:
            password = {ssha256}06$gWv2DM5AHjRPV3Bv$kWXAWTKBLkr3YP4ZKaoGnyh5gOKSc2WzkHKc.I2B.QL
            lastupdate = 1418722103

    This need to be automated because we have a lot of lpars and need to add users on majority of them, so manual work is out of question.

    Please advice

     

    #AIX-Forum


  • 2.  Re: set user passwd

    Posted Tue December 16, 2014 07:29 AM

    Originally posted by: tomislak


    Hi,

     

    I found solution for this, just useradd and then cat mypwdfile | chpasswd -c -e, with "user_name:{ssha256}06$......I2B.QL" in mypwdfile

    But I have other question now, I'll open new post for this...

     

    Regards


    #AIX-Forum


  • 3.  Re: set user passwd

    Posted Tue January 27, 2015 07:32 AM

    Originally posted by: vbalaji11


    Hi Tom,

    Nice one, thanks for sharing the solution.


    #AIX-Forum