leeds2000
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!
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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/Sm
HTH
Cheers
wmp