Samba Server config

Samba Server config:
[root@rhel6server ~]# yum install samba -y
[root@rhel6server ~]# mkdir /smbdemo

root@rhel6server ~]# cd /smbdemo/
[root@rhel6server smbdemo]# touch file1 file2 file3
[root@rhel6server smbdemo]# ls
file1 file2 file3
[root@rhel6server smbdemo]# smbpasswd -a vijay
New SMB password:
Retype new SMB password:
tdbsam_open: Converting version 0.0 database to version 4.0.
tdbsam_convert_backup: updated /var/lib/samba/private/passdb.tdb file.
Failed to add entry for user vijay.
[root@rhel6server smbdemo]# useradd vijay
[root@rhel6server smbdemo]# passwd vijay
Changing password for user vijay.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@rhel6server smbdemo]# smbpasswd -a vijay
New SMB password:
Retype new SMB password:
account_policy_get: tdb_fetch_uint32 failed for type 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 10 (refuse machine password change), returning 0
Added user vijay.

[root@rhel6server smbdemo]# groupadd smbusers

root@rhel6server smbdemo]# chown :smbusers /smbdemo
[root@rhel6server smbdemo]# usermod -G smbusers vijay
[root@rhel6server smbdemo]# cd /etc/samba
[root@rhel6server samba]# ll
total 20
-rw-r–r–. 1 root root 20 Feb 18 2011 lmhosts
-rw-r–r–. 1 root root 9778 Feb 18 2011 smb.conf
-rw-r–r–. 1 root root 97 Feb 18 2011 smbusers
[root@rhel6server samba]# cp smb.conf smb.conf.orig

[root@rhel6server samba]# vi smb.conf

:set nu

line 74 and enter
workgroup = OSTTODAY

[root@rhel6server samba]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
Processing section “[homes]”
Processing section “[printers]”
Processing section “[smbdemo]”
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
workgroup = OSTTODAY
server string = Samba Server Version %v
log file = /var/log/samba/log.%m
max log size = 50
cups options = raw

[homes]
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No

[smbdemo]
comment = Linux Samba Share
path = /smbdemo
read only = No
create mask = 0755
guest ok = Yes
[root@rhel6server samba]#

[root@rhel6server samba]# service smb start
Starting SMB services: [ OK ]
[root@rhel6server samba]# service nmb start
Starting NMB services: [ OK ]
[root@rhel6server samba]#

[root@rhel6server samba]# system-config-firewall

click on smb and save it, override it

root@rhel6server samba]# getenforce
Enforcing
[root@rhel6server samba]# setenforce 0
[root@rhel6server samba]# getenforce
Permissive
[root@rhel6server samba]#