Page 1 of 1

omaddu

Posted: Thu May 18, 2006 6:25 pm
by kluss0
What am I missing here? When I try to add a user via the command line with omaddu using the syntax that is in the man pages, in the server admin docs, and found here in the forums, I get an error:

[root@postal ~]# omaddu -n "Foo Bar/postal,aylus/IA="Foo Bar" <fbar@aylus.com>" -p foobar
omaddu : [OM 8116] Cannot add user with unlicensed internet address domain.


If I leave off the IA section, it works fine, except that it creates the mail address with the wrong convention (I have tried using ommodiam to change the convention, but it just won't change...) Am I just missing something incredibly obvious??

Thanks,
Kenny

Posted: Thu May 18, 2006 7:02 pm
by ScalixSupport
Hi Kenny,

The problem is that you have two many double-quotes in there. Try this:

Code: Select all

omaddu -n 'Foo Bar/postal,aylus/IA="Foo Bar" <fbar@aylus.com>' -p foobar


Thanks,
Rachel

Posted: Fri May 19, 2006 7:52 am
by kluss0
Wow.... That's embarrassing... incredibly obvious doesn't even begin to describe it :-)

Thanks, Rachel.

C_Ya,
Kenny

Posted: Mon Dec 18, 2006 4:47 pm
by Mouseclone
I have a question on using the omaddu tool to add users.

If i have a text file that is tab delimited, would it be possibel to write a script that would allow me to import users and passwords?

test file is like this

username password
bob corky
leeroy godsaremany
sam iam
darwin mutation


if i did a for each shell script would that be ok to get those 4 users imported correctly?

Posted: Tue Dec 19, 2006 7:27 pm
by btisdall
If your requirement is really that simple then this will do the job (IMO Perl is much better than shell for this sort of thing):

#!/usr/bin/perl
#sxaddulist.pl - add users from a simple list
$mailnode = "your, mailnode";
$omaddu = "/opt/scalix/bin/omaddu";
while (<>) {
next if /^#/; #skip commented header & other lines
($user,$pass) = split;
system ("$omaddu -n $user/$mailnode -p $pass");
}

Then simply do: sxaddulist.pl listfile

Of course if you want to add real names, specific email addresses & so on it gets more complicated.

Before getting into this check out the omaddu -bulk option, it might be able to satisfy your requirements.