[Samba] how to use MySQL-backend !?
Florian Stichlberger
office at seteq.ath.cx
Sun Dec 11 22:47:52 GMT 2005
Hi,
i want to run a standalone-samba-PDC with a mysql-passdb backend and i
configured the mysql-database as required.
but how should i add/remove users ?
when i try
smbpasswd -a username
most columns in database have [NULL] values
i also tried pdbedit but it exits with "No user SID retrieved from database!"
is there another tool to add/remove users ?
is my smb.conf ok, or do i need to mention each database column separately ?
i have seen examples without separate mentioning...
i appended a dump of my mysql-table and my smb.conf file
thanks in advance
Florian Stichlberger
Hall in Tirol, Austria
##### MySQL-Dump of Database
CREATE TABLE `user` (
`logon_time` int(9) default NULL,
`logoff_time` int(9) default NULL,
`kickoff_time` int(9) default NULL,
`pass_last_set_time` int(9) default NULL,
`pass_can_change_time` int(9) default NULL,
`pass_must_change_time` int(9) default NULL,
`username` varchar(255) default NULL,
`domain` varchar(255) default NULL,
`nt_username` varchar(255) default NULL,
`nt_fullname` varchar(255) default NULL,
`home_dir` varchar(255) default NULL,
`dir_drive` varchar(4) default NULL,
`logon_script` varchar(255) default NULL,
`profile_path` varchar(255) default NULL,
`acct_desc` varchar(255) default NULL,
`workstations` varchar(255) default NULL,
`unknown_str` varchar(255) default NULL,
`munged_dial` varchar(255) default NULL,
`uid` int(9) NOT NULL auto_increment,
`gid` int(9) default NULL,
`user_sid` varchar(255) default NULL,
`group_sid` varchar(255) default NULL,
`lm_pw` varchar(255) default NULL,
`nt_pw` varchar(255) default NULL,
`acct_ctrl` int(9) default NULL,
`unknown_3` int(9) default NULL,
`logon_divs` int(9) default NULL,
`hours_len` int(9) default NULL,
`unknown_5` int(9) default NULL,
`unknown_6` int(9) default '1260',
`bad_password_count` int(9) default NULL,
`logon_count` int(9) default '0',
`logon_hours` int(9) default NULL,
PRIMARY KEY (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;
##### end of MySQL-dump
### dump of smb.conf
[global]
workgroup = WORKGROUP
server string = SAMBA-Server
netbios name = SAMBA
passdb backend = mysql:foo
foo:mysql host = localhost
foo:mysql password = sambapass
foo:mysql user = samba
foo:mysql database = samba_auth
foo:mysql port = 3306
foo:table = user
security = user
encrypt passwords = no
update encrypted = no
unix password sync = yes
passwd program = /usr/bin/passwd %u
null passwords = no
printing = none
load printers = no
domain logons = yes
deadtime = 5
preferred master = yes
os level = 255
domain master = yes
local master = yes
wins support = yes
time server = yes
hosts allow = 10.10.1.
announce version = 4.9
hide dot files = no
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
case sensitive = no
default case = lower
short preserve case = yes
preserve case = yes
socket options = TCP_NODELAY
oplocks = yes
##### end of smb.conf dump
More information about the samba
mailing list