LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Thread Tools
Old 02-11-2009, 05:17 PM   #1
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Distribution: OpenBSD, Redhat, OpenSUSE, Solaris
Posts: 654
Thanked: 1
Solaris 8 - disable user account


[Log in to get rid of this advertisement]
Is there any way to disable a user account so that I can re-enable it easily later if needed? I tried admintool but that doesn't help me re-enable the account later without changing the user's password.

Thanks.
noir911 is offline     Reply With Quote
Old 02-11-2009, 06:17 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 5,040
Thanked: 222
If you don't want to change the password to disable the user, you can an invalid shell like /dev/null in /etc/passwd, or change the last field in /etc/shadow to "1".
bathory is offline     Reply With Quote
Old 02-18-2009, 01:10 AM   #3
ic_torres
Member
 
Registered: Nov 2005
Location: Philippines
Distribution: slackware 12.0, Vector Linux Soho 5.1 and 5.8, ZenWalk 4.6.1, OpenBSD 3.9
Posts: 359
Thanked: 5
Quote:
Originally Posted by noir911 View Post
Is there any way to disable a user account so that I can re-enable it easily later if needed? I tried admintool but that doesn't help me re-enable the account later without changing the user's password.

Thanks.
as root : usermod -L username : it locks the username's passwd

to re-enable : usermod -U username
ic_torres is offline     Reply With Quote
Old 02-18-2009, 02:51 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 5,040
Thanked: 222
Quote:
Originally Posted by ic_torres View Post
as root : usermod -L username : it locks the username's passwd

to re-enable : usermod -U username
There is no usrmod -L and usermod -U in solaris. This is used on Linux to lock a user's password.
bathory is offline     Reply With Quote
Old 02-18-2009, 03:46 AM   #5
ic_torres
Member
 
Registered: Nov 2005
Location: Philippines
Distribution: slackware 12.0, Vector Linux Soho 5.1 and 5.8, ZenWalk 4.6.1, OpenBSD 3.9
Posts: 359
Thanked: 5
Quote:
Originally Posted by bathory View Post
There is no usrmod -L and usermod -U in solaris. This is used on Linux to lock a user's password.
o yes.. i am sorry. .. i think the passwd command should be used?

thanks for the correction sir newbie here
ic_torres is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solaris 9] unlock user account noir911 Solaris / OpenSolaris 18 09-08-2009 11:11 PM
Prevent user account from logging in but allow su to account DejaCpp Linux - General 4 07-26-2006 12:44 PM
Disable account scbops Linux - General 1 05-17-2006 06:52 AM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 11:02 AM
Disable passwd change for user account sodhilogin Linux - General 6 09-01-2004 01:43 AM


All times are GMT -5. The time now is 09:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration