remotely new user add with password in samba server
Dear All,
I am using ldap and samba on rhel 4 update 4. I am configuring samba with ldap users and password. Everything is working fine. Now I want to write a script which will add new user and password on samba server. I will run this script from another machine. all ldap users are available in samba server as I am using ldap authentication through authconfig. I have read man page of smbpasswd and tried as follows --
new username -- kkk
password for kkk --- abcdef
samba server -- 192.168.1.78
I tried the following command ---
smbpasswd -r 192.168.1.78 -U kkk changeme
but it did not work . as per man page -s option can be used for this purpose. But when I am giving --
smbpasswd -r 192.168.1.78 -U kkk -s changeme
it did not execute.
If I can give new username and password in a single command ( it will not ask for New smb passowrd) like ---
smbpasswd -a kkk changeme
it can also solve my problem. I will configure ssh with key and then execute that command on samba server.
I have to run this script from another server which will add user and password on samba server.
Thanks in advance............
Regards
anindya bhattacharjee
|