Force user to change passwd on first login

Hello All,

How to force user to change his login passwd on his first login in solaris 10 ?

while adding user do we need to set the password in theis case??

You can use

#passwd -f <username>

to force the user to change the password on the next logging, however you have to set the password separately

After Running this command, It shows that

passwd: password information changed for <username>

but when i am trying to login with user i am not able to login remotely. i tried with another user i am able to login??

You were able to logging to this user before without changing the password information? The moment you logging with user name and password system is going to give u option for the new password and confirmation.

Please check the logging directory and shell for the user !!

Yes i was login successfully before changing the password information

Shell is bash

Can you try to logging to system through some different user and then try logging to user with su - ? Just see if are able to logging on not?

yes , i logged in through another user the su - <username>

it showed Password for the user <username> has expired and it prompted for new password. and i changed the password to new one

but, still this can happen if user is logged in then su . how to recreate this on first login.??

I am not sure if i have understood your question. Well for recreating all you have to do is execute # passwd -f <username> and it will prompt the user to change the password