ONTAP Discussions

set-password in script for "vserver cifs users-and-groups local-user set-password"

maartendeboer
1,751 Views

Hello,

Does anyone know how to set password for "vserver cifs users-and-groups local-user set-password" from a (shell-)script?

I need to (re)set a lot of password words from (local) CIFS users.

At 7-mode is was "vfiler run ${VFILER} useradmin user modify ${USERNAME} -p ${NEWPWD}"

Thanks.

2 REPLIES 2

paul_stejskal
1,683 Views

Doesn't seem possible. Perhaps you could send two lines of password?

 

maartendeboer
1,498 Views

Tried many ways like;

echo -e "Welcome2XYZ-0101\rWelcome2XYZ-0101"| ssh cluster "vserver cifs users-and-groups local-user set-password -vserver vserver -user-name VSERVER\user01"

echo -e "Welcome2XYZ-0101\nWelcome2XYZ-0101"| ssh cluster "vserver cifs users-and-groups local-user set-password -vserver vserver -user-name VSERVER\user01"

echo "Welcome2XYZ-0101";echo "Welcome2XYZ-0101"| ssh cluster "vserver cifs users-and-groups local-user set-password -vserver vserver -user-name VSERVER\user01"

 

Non of them worked.

Has someone an other idea?

Thanks.

Public