# adding user to samba with ldap fails [solved, as good as]

## hika

I for the first time in long wanted to add a samba user to my ldap. In the past I did it with the ntusertools, but there I get an access denied or can' find user error.

Looking further. I tried both smbldap-useradd -m <user>, pdbedit -a -u <user> and net rpc user add <user>

The last one gave 'No such User' as an error, the other two give the following error:

```
Can't locate Convert/ASN1.pm in @INC (@INC contains: /usr/bin/ /etc/perl /usr/lib/perl5 

...

) at /usr/lib/perl15/vendor_perl/5.12.2/Net/LDAP.pm  line 12.

BEGIN failed--compilation aborted at /usr/lib/perl15/vendor_perl/5.12.2/Net/LDAP.pm  line 12.

Compilation failed in require at /usr/sbin/smbldap_tools.pm line 25.

BEGIN failed--compilation aborted at /usr/sbin/smbldap_tools.pm line 25.

Compilation failed in require at /usr/sbin/smbldap-useradd line 30.

BEGIN failed--compilation aborted at /usr/sbin/smbldap-useradd line 30.
```

Sounds like something with Perl. I know there was some time ago a Perl update, but I know little about Perl.

I re-emerged the smbldap-tools, but that doesn't change anything.

In the past it all worked. Any suggestions?

HikaLast edited by hika on Fri Feb 18, 2011 12:55 pm; edited 1 time in total

----------

## hika

In the meantime I have been looking further in to it. It seems it cant find the Perl file ASN1.pm.

There is one in /usr/lib/perl5/vendor_perl/5.8.8/Convert/ 

but it looks in /usr/lib/perl5/vendor_perl/5.12.2/Convert/.

So it has to do with an upgrade, but is it from Perl or one of those Perl add-ons??

Can anybody tell me what I have to re-emerge or has it to do with some flags in portage that I have to change before that?

Hika

----------

## hika

I re-emerged all the dev-perl modules and most problems are solved. I tried to do it with revdep-rebuild, but it said all was OK. Could that be because the old Perl is still there?

I go further looking for the remaining problems, like why ntusertools still give access denied, both on adding and changing groups. The rest works.

Hika

----------

## Anton Gubarkov

It looks like perl-cleaner  is the right tool to complete the task quickly.

----------

## hika

Thanks, a bit late and I'll try but more important, it goes in record for people to find later.

Hika

----------

## hika

Oops it wants a lot of options.

You know any to the point.

Maby --all

Hika

----------

## hika

I ran --all, but some info would be helpfull to a lot of people. If you know about perl?  :Wink: 

----------

