cancel
Showing results for 
Search instead for 
Did you mean: 

Unlocking user account

winmoon
Occasional Visitor

Unlocking user account

Will the user account be unlocked if a root user executes the follwing command

su - username

I mean if username is locked and after executing this command will that unlock the account username
10 REPLIES
avizen9
Esteemed Contributor

Re: Unlocking user account

do you have root account password?
are you able to open SAM or can modify /etc/password file?

let me know,
Patrick Wallek
Honored Contributor

Re: Unlocking user account

No. To unlock an account you need to do:

/usr/lbin/modprpw -k username

while logged in as root.
Shahul
Esteemed Contributor

Re: Unlocking user account


No, by doing "su", user account does not get unlocked.

Shahul
Ganesan R
Honored Contributor

Re: Unlocking user account

Hi,

passwd -d username -> will unlock the account
Best wishes,

Ganesh.
Patrick Wallek
Honored Contributor

Re: Unlocking user account

>>passwd -d username -> will unlock the account

Only if the system is NOT trusted.

Here is the man page excerpt for the '-d' option to the passwd command:

-d -- Allow user to login without a password by deleting it. In untrusted mode this unlocks / activates the user account if found locked/deactivated
Shailendran V Naidu
Frequent Advisor

Re: Unlocking user account

Hi,
You need to have root privileges to unlock a user account.

Run:
# sam
Accounts for Users and Groups -> Users -> Select the user -> Action -> Reactivate.

or

# passwd -d

Thanks,
Hakki Aydin Ucar
Honored Contributor

Re: Unlocking user account

/usr/lbin/modprpw -k username

it works if system trusted;

Gokul Chandola
Trusted Contributor

Re: Unlocking user account

Hi,
Use the gui tool is the best option if you are new in unix.
# SAM
Then you will get GUI menu --> go to Users andd Groups.

Regards,
Gokul Chandola
There is always some scope for improvment.
Sharma Sanjeev
Respected Contributor

Re: Unlocking user account

Hi,

If system is trusted than use

/usr/lbin/modprpw -k username to unblock user

For Non-Trusted system

passwd -d

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Md. Farhan A Azam
Trusted Contributor

Re: Unlocking user account

Hi,

The command which you have given (su - username)is not for unlocking the account, it's for switching from one user to another user (for more details about su - #man su).

For unlocking the accounts :-friends have given many suggetions.

Thnx...Farhan