Here is a simple bash script to import a csv file into samba server.
# vi importsamba.sh
#!/bin/bash
CSVFILE=/home/domainnameyahoo/listusers.csv
CMD=`which smbldap-adduser`
for i in `cat $CSVFILE|sed ’s/, /,/g’`; do
UN=`echo $i | cut -f1 -d’,'`
PW=`echo $i | cut -f2 -d’,'`
echo $CMD$UN -P $PW
done
the CSV format is :
username1,password1
username2,password2
….
Hope this will help.
September 1st, 2009
Posted by
admin |
Samba |
no comments
Web server and File server is good to be placed on different machine.
In my case, I have web server running apache+php+mysql under Centos Box, and File Server is on Windows Advanced Server 2000. The problem is apache cannot read the php file in Windows server.
All I have done :
- I added line at fstab configuration
//192.168.1.3/data/media/code cifs username=administrator,password= 0 0
- I edit httpd.conf as below
EnableMMAP off
EnableSendfile off
That’s all, and only that. Many people pay for this solution, But I gave you FREE !!.
April 14th, 2009
Posted by
admin |
Apache, CentOS, Samba, Ubuntu, Windows |
no comments
This is taken from syslog :
Sep 24 21:29:15 localhost smbd[9789]: [2008/09/24 21:29:15, 0] auth/auth_util.c:create_builtin_administrators(785)
Sep 24 21:29:15 localhost smbd[9789]: create_builtin_administrators: Failed to create Administrators
Sep 24 21:29:15 localhost smbd[9789]: [2008/09/24 21:29:15, 0] auth/auth_util.c:create_builtin_users(751)
Sep 24 21:29:15 localhost smbd[9789]: create_builtin_users: Failed to create Users
Sep 24 21:29:15 localhost smbd[9791]: [2008/09/24 21:29:15, 0] auth/auth_util.c:create_builtin_administrators(785)
Sep 24 21:29:15 localhost smbd[9791]: create_builtin_administrators: Failed to create Administrators
Sep 24 21:29:15 localhost smbd[9791]: [2008/09/24 21:29:15, 0] auth/auth_util.c:create_builtin_users(751)
Sep 24 21:29:15 localhost smbd[9791]: create_builtin_users: Failed to create Users
It seems that you didnt add the idmap parameter. Try to edit /etc/samba/smb.conf , and take a look the idmap part of your smb.conf.
[global]
idmap uid = 15000-20000
idmap gid = 15000-20000
Then Restart samba & winbindd :
# service smb restart
# service winbindd restart
September 26th, 2008
Posted by
admin |
CentOS, Samba |
no comments
Something strange about samba at CentOS.
After all samba configurations are setup properly as PDC , have tested to join domain and user sharing and authentications, suddenly the system-config-samba has missed all the samba users as follows :

Here’s the trick.
First, you have to uninstall the system-config-samba-1.2.39-1.el5.noarch.rpm
# rpm -e system-config-samba-1.2.39-1.el5.noarch.rpm
then install system-config-samba for Fedora Core 9 , you may download here
# rpm -ivh system-config-samba-1.2.63-1.fc9.noarch.rpm –nodeps
Remember, use –nodeps parameter because the dependencies files are diffrent from CentOS.
And, you are done. You may see it at menu “Applications-System tools - Samba
August 7th, 2008
Posted by
admin |
CentOS, Samba |
no comments