LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 12-29-2007, 12:58 AM   #1
anindyabhattacharjee
LQ Newbie
 
Registered: Oct 2006
Posts: 14

Rep: Reputation: 0
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
 
Old 12-30-2007, 06:38 PM   #2
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
According to the man-pages of smbpasswd you are supposed to use netbios name with the -r option. I don't have a ldap-server anymore, so I can't test if it is possible to use both netbios or IP. Anyway, it's worth a shot.

Anyway, you could try out the smbldap-tools package. Those programs can be used to add/remove/modify your userdatabase on your ldap server from the commandline.
 
Old 01-01-2008, 03:48 AM   #3
anindyabhattacharjee
LQ Newbie
 
Registered: Oct 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Dear Dinithion,

thanks for your reply. I have solved the problem for time being.
later I will look into smb-ldap.

Thanks once again.

Regards
anindya
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
howto change samba password remotely from a windows client? yafrank Linux - Networking 8 08-04-2013 12:16 PM
Add a user with no password/or user pick password. knockout_artist Linux - Newbie 2 11-26-2007 09:08 AM
howto change samba password remotely from a windows client? yafrank Linux - Software 2 01-21-2005 12:14 PM
Samba 3.0: net user add - problem with password geodo Linux - Networking 1 12-06-2004 11:52 AM
How do I add a host user password to mysql server? cmisip Linux - Networking 3 12-16-2002 09:57 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration