Sunday, August 2, 2009

Samba Server on Centos HOWTO

TDB database
root: > smbd -b | grep PRIVATE_DIR
/etc/samba

root: >smbd -b | grep LOCKDIR
/var/cache/samba

use tdbbackup utility to backup those tdb files

mkdir a directory and change its ownship
chown account.group /path/to/directory

Samba Configruation File
root: >smbd -b | grep smb.conf
/etc/samba/smb.conf

Dry run Samba Configurations
root: >testparm /etc/samba/smb.conf
root: >smbclient -L xxx.xxx.xxx.xxx(SambaServerIP) -U%

Samba valid user setup
root: >smbpasswd -a csguest
New SMB password:
Retype new SMB password:
startsmbfilepwent_internal: file /etc/samba/smbpasswd did not exist. File successfully created.
Added user csguest.

chown user.group /path/to/sambashare

Run/start/stop/restart Samba Server
root: >service smb reload
root: >service smb start
root: >service smb stop
root: >service smb condrestart

Mount Samba Share in Linux
root: >apt-get install smbfs
root: >smbmount //SambaServerIP/SambaShare /mnt/Dir -o username=account, password=pwd

Access Samba Share in WindowsXP
Control Panel -> User Accounts -> yourUserAccount
Click Manage my network passwords
Add button to enter Server, User name and Password
Server: xxx.xxx.xxx.xxx(SambaServerIP)
Username: xxx.xxx.xxx.xxx\AccountName
Password:******

My Computer -> Tools -> Map Network Drive
Folder: //SambaServerIP/SambaShare

No comments: