Results 1 to 5 of 5

Thread: import /etc/passwd script for zmprov

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Posts
    15
    Rep Power
    9

    Default import /etc/passwd script for zmprov

    Okay i figured someone here has already wrong a script to parse the /etc/passwd file and then feed it to zmprov with a default password set. Could someone provide this script? There is no reason to reinvent the wheel here

    -LC

  2. #2
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    14

    Default

    I haven't seen one, but:

    Code:
    #!/bin/bash
    
    for i in `awk -F: '{print $1}' /etc/passwd`; do
        zmprov ca ${i}'@domain.com' welcome1
    done
    Should do the trick.
    Last edited by marcmac; 03-29-2006 at 08:41 AM. Reason: typo
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    Join Date
    Mar 2006
    Posts
    15
    Rep Power
    9

    Default

    lol.. I just did something almost identical. Thanks for the reply though.. Other users might need it

    -LC

  4. #4
    Join Date
    Mar 2006
    Posts
    15
    Rep Power
    9

    Default

    is there a reason why you include the homedir for the user with
    `awk -F: '{print $6}' /etc/passwd`; ? For me i used print $1 to get just the name without the homedir

    -LC

  5. #5
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    14

    Default

    Um - because I hadn't drunk enough coffee - that should have been $1, not $6.
    Bugzilla - Wiki - Downloads - Before posting... Search!

Similar Threads

  1. Changing Calendar Organizer script
    By snsparrish in forum Administrators
    Replies: 4
    Last Post: 05-02-2011, 04:41 AM
  2. Replies: 1
    Last Post: 07-27-2007, 12:19 PM
  3. Replies: 0
    Last Post: 06-21-2007, 02:33 PM
  4. Please Skip Calendar in Import Wizard
    By ThorGoLucky in forum Migration
    Replies: 3
    Last Post: 02-15-2007, 07:51 PM
  5. import wizard doesn't import recurring events?
    By spot in forum Administrators
    Replies: 0
    Last Post: 12-18-2006, 02:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •