Expire/Suspend User account using chpass

I have a need to expire/suspend certain user accounts on a specific date. So basically when I setup a user account, the account is only good until a certain date. I see that there is a "chpass" command and I have tried that but it does not seem to work. Is there something special that I need to do?
As a test I did a "chpass imts" and the editor came up. I changed the expire date to Dec 1 2006 and saved. I verified in NetInfo that the expire flag had been added to the user account. I then tried a "login" from a terminal and I was allowed to login.
Is there something special that I need to do to get this to work on OS X Tiger "Client"?
Thanks for any help
Mike

I haven't tried setting accounts to expire using 'chpass', but 'pwpolicy' does work, at least in limited tinkering on my system (10.4.8). It adds a 'passwordpolicyoptions' property (it's one of those long multi-line values that look like xml) to the user's entry in "NetInfo". Try 'man pwpolicy' for more details - not all of the options actually work on an OS X client system, but the account expiry ones do.
The 'passwordpolicyoptions' can also be set using "Workgroup Manger.app", included with the "Server Admin Tools" which can be downloaded from Apple, and used to configure OS X client.
http://www.apple.com/support/downloads/serveradmintools1047.html
Note that "admin" accounts aren't subject to password policies.

Similar Messages

  • HT2602 If i download mountain lion will all user accounts use this operating system automatically?

    If i download mountain lion will all user accounts use this operating system automatically?  Or do I need to download it for each user... Its taking ages to download too.

    Welcome to the Apple Support Communities
    When you upgrade the operating system, all users are upgraded to be used with the new version, so you won't have to upgrade OS X each time for all your users

  • 2 user accounts using 1 iCloud drive account, different folders and files for each user.

    I have two user accounts on my Mac. One for work and one for personal use.
    They both share my iCloud and iCloud drive account. My issue is that when I update the files in my work account the changes do not take place when I log into my personal account on my mac.. I find this strange seeing as I am only using one account for both.
    This means when I am working and make folders or rename files and folders they only appear when I view iCloud Drive from that user profile. When I try to view iCloud drive from my personal user account or other iOS devices like my phone the old changes remain.
    Has anyone any ideas why this is?

    Because iCloud drive is not shared between users.  Each account has it's own storage.  It is NOT shared.

  • Add shared calendar to another users account using powershell

    Hi,
    I am trying to add a calendar to another using account using powershell as it will be easier to make a script than logging in to each user and adding the calendar. Has anyone done this before or know how to do it.
    Thanks

    Are you asking about Outlook or about Exchange?
    In Exchange you can likely do this via EWS.
    Here is how to do this in Access but has to be done under user account:\
    http://www.outlookcode.com/threads.aspx?forumid=2&messageid=27088
    Under EWS it is similar but can be done by impersonation.
    ¯\_(ツ)_/¯

  • Create User Account Using Terminal in OSX 10.9.5

    I am working on creating a shell script to create a specific user on all Mac computers at work. I have run the following commands in Terminal with no luck:
    dscl . create /Users/myuser
    dscl . create /Users/myuser RealName "My User"
    dscl . passwd /Users/myuser UsersPW
    dscl . create /Users/myuser UniqueID 561
    dscl . create /Users/myuser PrimaryGroupID 1000
    dscl . create /Users/myuser NFSHomeDirectory /Users/administrator
    dscl . create /Users/myuser UserShell /bin/bash
    dscl . append /Groups/admin GroupMembership administrator
    I have seen in the discussions that running these commands has enabled some to log in using the user account they created - they just can't see the user account in the Users list in Sys Prefs. I can't see my user account, log into my computer with it, or see a user folder at /Users/myuser. I AM able to see the user after running the dscl command and cd Local/Users/myuser - but with an ls that directory is empty. What am I missing?
    In terminal I am using the root user. I've tried logging in with sudo su and sudo -s. All commands run, but no account is created.
    If anyone could help it would be greatly appreciated.

    I don't really understand your reply, but since asking my question I realized that if, rather than choose 'New Image' inside the Disk Utility window, I use the menu bar at the top of the screen, and select File > New > Blank Disk Image,  then I get the choices I hoped for. It's all in looking in the right place, I guess, but I do wonder why those choices are not available when you choose 'New Image' within the Disk Utility window. Oh well.

  • Where is the MailAccounts.plist stored for a network user account using Apple Mail on Snow Lion?

    Where is the MailAccounts.plist file stored for a network user using Apple Mail on Snow Leopard?  It appears one of my users has managed to do something to their mail account as Apple Mail will no longer close once opened and the Sent Folder has a perpetual spinning pinwheel.

    They would have to be logged in as separate users in order not to see your account in Mail. Whatever accounts put in Mail under your account will show up. All mail accounts usually have there own user and password. The only thing you can do is to remove the password from Keychain and take the account offline so you don't keep getting prompts for passwords each time it checks for mail.
    Not a great solution.
    Best way is to give the other user their own user account with their own mail and enable fast user swithcing to log between the different users if all access the computer frequently.

  • Pushing Out User Account Using ARD

    Does anyone know if it is possible to push an entire user account from the administrative computer to a client computer? I am trying to come up with an easy way to create a new user account on 35 student computers in a lab setting. Thanks

    Hi
    You should be able to achieve this using the command line? The commands that follow need to be run as root. As an example let's use one of Apple's 'favourite' test users - Howie Doitt.
    Create a new entry in the local domain under the category /Users
    dscl . -create /Users/howiedoitt
    Create and set the shell property
    dscl . -create /Users/howiedoitt UserShell /bin/bash
    Create and set the user’s full name
    dscl . -create /Users/howiedoitt RealName "Howie Doitt"
    Create and set the user’s ID (assuming only one account?)
    dscl . -create /Users/howiedoitt UniqueID 510
    Create and set the user’s group ID (the default staff group)
    dscl . -create /Users/howiedoitt PrimaryGroupID 20
    Create and set the user home directory
    dscl . -create /Users/howiedoitt NFSHomeDirectory /Local/Users/howiedoitt
    Set the password - if desired?
    dscl . -passwd /Users/howiedoitt whateverpasswordyouwant
    If you would like howiedoitt to be able to perform administrative duties
    dscl . -append /Groups/admin GroupMembership howiedoitt
    Restart the workstation(s) or log out the current user and log in again as the new user for changes to take effect. If there was no home folder created it will be created on successful login with the appropriate POSIX permissions set. You could pre-create the home folder in /Users using the mkdir command making sure you define that folder's name as the created user's shortname.
    There are a number of ways of doing the above using ARD. You could do it command by command applied to a selected list of computers. Or combine the whole lot into a script and run the script. You could even schedule when the script can be run.
    Tony

  • Mirroring itunes in all User Accounts using OSx Lion?

    Hi do we share the same itunes in all of our i=user accounts on our imac using OSx Lion?
    This must be a simple question but I seem to be missing it.
    Thanks,
    Steve

    Two approaches. Do you mean a single library (as in what you see in iTunes, playlists, etc.)?  Or do you mean the same media but each person has different libraries?
    Chris CA's instructions on sharing iTunes music libraries between multiple user accounts - http://discussions.apple.com/message.jspa?messageID=8973804
    Similar procedure but you only share media, not the whole library:
    iTunes: How to share music between different accounts on a single computer - http://support.apple.com/kb/HT1203 - relocating iTunes' media folder to a shared area but leaving separate library files - extra tip at https://discussions.apple.com/message/17331189

  • Two user accounts using the same home folder

    This may sound like a silly or goofy question, but I was wondering if anyone knows how to use two different user accounts, but with each using the same home folder?
    I was wondering because there are many different settings I would like to use for different settings. Kind of like a "Spaces on Steroids." When I'm at school, I'd like to use one Network Settings, one desktop and icons, one Dock, etc. And when at home, a different set of each, but still using the same home folder.
    Any help or suggestions would be most appreciated.

    ZooCrewMan wrote:
    So, I figured the easiest was would be seperate user accounts, "Home" "School" "Work" etc., and all have different settings, but still point to the same Home Folder.
    The problem is, most of those settings are kept in the home folder.
    You could probably do what Softwater suggests, with an AppleScript, or perhaps an Automator workflow, but it's not without some serious downsides.  You'd need one for each setup.
    At least one complication would be, any change you wanted to make to each setup would have to be done to that script; you couldn't just drag something into (or out of) the Dock.
    Another theoretical possiblility would be to have separate user accounts, but use the special Shared user folder for your data.  You'd have to select it as a souce or destination for each app you use, but many will remember that from use to use. 
    The complication would be permissions.  When you save a document there, the user that saved it is the owner, with read & write rights.  All other users have read-only rights, so could view and open them, but not update them.  You'd probably want to create one or more sub-folders in the Shared account (for various types of files), and you could probably set a Folder Action on each to grant read & write permissions to anything created in them.
    Then you could set up the desired network location, Dock, and Desktop for each user account.

  • Change users from Administrator account to user account using domain controller

    good day,
    In our domain controller we have around 1200 users, all these users have admin account and there is the problem.
    I want to change them to a user accounts so they can not change IP address and install or uninstall programs with out our consent.
    Is there a possibility to do this with the domain controller, because i don't want to go change the computers one by one. from admin account to user account.
    Thank you so much

    Hi,
    I agree with
    Ravikumar. I assume what you mean is local admin rights. Since you have so many users which
    have local admin rights, you would have created an administrator group and add all the users to that group in Local Users and Groups of Computer Management. You can remove them from the administrator group and add them to a user group.
    More information:
    Local Users and Groups
    http://technet.microsoft.com/en-us/library/cc786411(v=ws.10).aspx
    Best regards,
    Susie

  • Home directory creation for local user accounts using powershell

    Through Computer Management when I create a user, a home directory is created for the same user in the folder C:\Users.I am creating a user through powershell in a remote machine.I am using the following script to create user 
    $comp = [ADSI]'WinNT://localhost,computer';
    $user = $comp.Create('User', 'account7');
    $user.SetPassword('Welcome1');
    $user.SetInfo();
    The account is getting created. But no home directory is created for this user. How to create a home directory for a user using powershell? Also the user created through GUI is a member of the group 'Users' by default. How to add the user created to the
    'Users'  Group.

    Hi Cmm user,
    Thanks for your posting.
    To set the attribute of homedirectory for a user in powershell, please also try the cmdlet set-aduser:
    import-module activedirectory
    $HomeDrive=’Z:’
    $UserRoot=’\\CONTOSO-FPS\Users$\’
    $HomeDirectory=$UserRoot+$AccountName
    SET-ADUSER $AccountName –HomeDrive $HomeDrive –HomeDirectory $HomeDirectory
    I hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Unable to log in to user account after installing windows 7 using Bootcamp

    Hi everyone,
    I need help. I have been at it for days, I have googled every which way but I am not able to fix this. Basically my problem is that I am unable to log in to my user account after I used Bootcamp to install windows 7. I will explain what I did up until I couldn't log in.
    I backed up my user account using Time Machine(I was logged in as the user). The account had FileVault activated and I neglected to disable FileVault before back up. I just didn't think to, it did not even occur to me! Then I partitioned Macintosh HD, I was doing this with my step son and he thought we were supposed to partition the hard drive first before running Bootcamp! After that was done, I couldn't run Bootcamp because obviously we had whipped the HD clean! Anyway, I reinstalled the OS X using the internet, after which I run Bootcamp and successfully installed windows 7. Then I went on to restore my account using Time Machine, only when I try to log in I get the error message "you are unable to log in to the user account at this time". I tried every possible solution I could find on here, including creating a new admin account, deleting the old account but saving the user folder and then routing the new account to the old user folder. Still nothing. I have tried logging in as a root user, reset the master password and deleted FileVault files from Library/keychain in the hope I would access the user account, but to no avail. What's more is that I can't even see the sparse bundle or sparse image files that people keep referring too. I can't even find it on the Time Machine back up! I then thought I would cut my losses and try system recovery using Stellar Phoenix Mac Data Recovery (cost me £81) but it did not recover any of my photos, music, videos or documents.
    I honestly can't come to terms with the fact that I am unable to login to an account with 3 years worth of pictures and documents. I am having a hard time letting go. Is there anyway possible to crack this?
    Thank you in advance.
    By the way, I am running Mountain Lion OX 10.8.4 on MacBook mid 2010

    I have this exact problem. Installed Bootcamp on a networked iMac running Mountain lion and and can no longer log in to my Mac user account. Would love if any of the pro users on here can shed a bit of light.

  • My trackpad is not clicking on the user accounts when I am logging in. It works fine once I have clicked using the mouse

    My trackpad is not clicking on the user accounts when I am logging in. It works fine once I have logged into the user account using the mouse to select the user account I want to use.

    Hi klaus,
    It's running 10.9.1
    Any help would be much appreciated
    Thanks
    Scottie

  • How do we sync contacts and calendars (ONLY) between two iCloud accounts, two iPhones and one iMac with two user accounts?

    This is complex.  Until today we had one iMac with two user accounts - one for me and the other for my wife.  We sync'd our calendars and contacts between our two user accounts using my iCloud account, thereby keeping our schedules coordinated and our contacts information always the same between us.  Also, as I had an iPhone, I sync'd my phone with my iCloud account, thereby keeping the contacts and calendars in the two user accounts on the iMac AND my iPhone sync'd.  (I also sync'd other things, like Notes and Mail and Safari settings, between my iPhone and my user account on the iMac, but my wife did not want to be burdened with all my emails showing up in her email account and I wasn't interested in hers, etc., so we didn't sync anything between us other than calendars and contacts.)
    We've finally bought my wife an iPhone and set up an iCloud account for her.  And of course she now wants to sync several items from HER account on our iMac to HER iPhone, but I don't want them, just as she doesn't want all of my other stuff.  But we still want our mutual calendars and contacts to sync to HER new iPhone, just like they already do to mine.  But I can't figure out how to CHANGE her iMac user account from using MY iCloud account on the iMac to using HER new iCloud account, and then having HER iCloud account speak to MY iCloud account but share JUST our calendars and contacts.
    Originally I tried a workaround by simply having her iPhone log into my iCloud account.  That works great for the calendars and the contacts.  But...she can't sync anything else from her iMac account to her new iPhone because she's presently "forced" to use my iCloud account.  And neither of us want to sync our other things to each other's iMac accounts or iPhones.  Also as we're both using my iCloud account, in things like the Find My iPhone app, the Cloud is seeking two phones labeled with my name and none with her's.  So we definitely don't want this as the set-up and communications network between our devices.
    We want to set up our users on the iMac to sync to our SEPARATE AND DIFFERENT iCloud accounts and then have those iCloud accounts sync calendars and contacts (ONLY) between themselves, and then push that data to our separate iPhones (or the other way, from either of our iPhones to the individual accounts on our iMac and the other person's iPhone).  Does this description make sense to you?  I've diagramed it nicely using Keynote, but even thiough I can draw it, I can't figure out how to set up and configure all the devices to make it work.  If you would like me to send the Keynote slides (just two of them - the current and desired configurations - please send your email address to me at [email protected] and I'll be happy to forward it to you.
    If anyone can help me set this up I'd be most appreciative!  Thanks so much.  Merry Christmas and Happy New Year to all readers in this community!

    BobT.
    I had the same problem, and decided to look into it last night.
    First of all, the solution I would like to have is for Apple to allow for selection of iCloud accounts per application, i.e. Contacts to one, Photo Stream to another. I believe this would be the most straight forward solution for the problem we are facing. 
    Since this is not an option I came up with a workaround. I was most interested in solving this for Contacts, so this is what I tested for. Now I have all 3 devices with the same contacts.
    1) Turn off iCloud for Contacts on all devices. On the device that has the Contacts list that you would like to propagate to all others select to keep the contacts, and on the others select not to keep them.
       Note that the current backups still exist on iCloud, so in case something goes wrong you can still turn the iCloud for Contacts back on to get your current Contacts back.
    2) In iTunes, sync All Contacts with the phones, starting with the one with the Contacts content you chose to keep.
    From this point on, the 3 devices should sync contacts with each other.
    This, of course, will stop your iCloud backups of Contacts, but I don't think this is really needed. You are already storing copies of your Conacts on 3 devices, which for good parts of the day are likely not all co-located. You also potentially have Time Machine backups turned on, which would mean there is a 4th copy there as well. For the case of Contacts iCloud only complicates matter ... that is until Apple implements the solution I first wrote about.

  • 1 Mac.  Two User accounts. Same iTunes library.

    can two user accounts use the same tunes library?
    i donthave to put the library in the public/shared folder do i?
    thx

    one question though.....
    it seems that each user has a different user library, even though the libaray files are stored in the same place.....
    that is irriating
    how can i tell itunes to have both users itunes library data files in the same place?
    is that possible?

Maybe you are looking for

  • Rendering a dynamic image(blob) in a BI Publisher Report via an RTF templat

    Been working on this for a while and now at a dead end hoping the experts can direct me to try something new. There is lots in the forums on blobs and displaying in reports and from it all I have gleaned that I need to encode the blob in Base64 and t

  • Microphone not working after installing the windows 8.1 on HP TOUCH SCREEN IQ 524

    Microphone not working after installing the windows 8.1 on HP TOUCH SCREEN IQ 524, The system shows everything is ok. Please any help greatly apreaciated. Thank you Valentin

  • White stripes in exported JPEGs

    Dear Friends, I use Windows XP SP 2, Indesign CS 2 (Vers. 4.0.5). I use the Indesign in-built jpeg export function very often because I need the output for some flash presentation (flash book). But the output is sometimes distorted with white stripes

  • Photos not deleting in moments/collections!

    hello, i recently discovered some images that i deleted from stream and camera roll a while back still appear in moments/collections, the grey trash can in the top corner (ipad) is faint and not available to me? any advice please!!!?

  • ISupplier Portal

    Hi, I want to work on iSupplier Portal. neerd to know the Prerequisits for iSupplier from basic level. can anybody provide me any document for it. Thanks, Abdul Wasi