Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-29-2006, 07:34 AM
Intermediate Member
 
Posts: 15
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
Reply With Quote
  #2 (permalink)  
Old 03-29-2006, 08:00 AM
Zimbra Employee
 
Posts: 2,103
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.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!

Last edited by marcmac; 03-29-2006 at 08:41 AM.. Reason: typo
Reply With Quote
  #3 (permalink)  
Old 03-29-2006, 08:20 AM
Intermediate Member
 
Posts: 15
Default

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

-LC
Reply With Quote
  #4 (permalink)  
Old 03-29-2006, 08:28 AM
Intermediate Member
 
Posts: 15
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
Reply With Quote
  #5 (permalink)  
Old 03-29-2006, 08:41 AM
Zimbra Employee
 
Posts: 2,103
Default

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.