Link to home
Start Free TrialLog in
Avatar of leeds2000
leeds2000Flag for Norway

asked on

Creating a script for adding samba/ldap users

I need to have a script to use for adding users to my samba PDC, which is integrated with ldap.

this script i have added is not working becouse it doesnt add a password, i need a command that adds a password too, so i can add several users from a text file.

Or else i cant get this users to log in to the domain, please help!
#!/bin/sh
 
 
IFS="
"
 
for line in `cat $1`;do
 
username=$line
 
smbldap-useradd -m $username
 
done

Open in new window

Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Hi,

do you know these?
- quoting -
There are two scripts in the smbldap-installer directory to help you add users in bulk: create-usernames and smbldap-useradd-bulk.
Here is a neat description -
https://wiki.ubuntu.com/SmbLdapManagingUsers#3
HTH
Cheers
wmp
 
 
Avatar of leeds2000

ASKER

I really need my script to be able to autogenerate the password, not a predefined bulk script
Since neither smbldap-useradd nor smbldap-usermod provide such a functionality, I'd really advise you to re-read the link I posted.
ASKER CERTIFIED SOLUTION
Avatar of leeds2000
leeds2000
Flag of Norway image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial