174 The Virtualization Cookbook for Red Hat Enterprise Linux 5.2
Retype new SMB password: <lnx4vm>
startsmbfilepwent_internal: file /etc/samba/smbpasswd did not exist. File successfully
created.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min passwd length), returning 0
...
Added user sambauser1.
You can see that the last smbpasswd command added sambauser1 to the file smbpasswd:
# cat smbpasswd
sambauser1:502:2E6F0C45D305054CAAD3B435B51404EE:74154D10CC18CFC98F1ED128DB8764DA:[U
]:LCT-45A3AAB2:
This method of maintaining Samba users, groups and passwords is useful for a small number
of users. For a larger number of users, merging Samba and LDAP is recommended. It is not a
simple as pointing the virtual file and print server at the virtual LDAP server as described in
12.2, “Creating a virtual LDAP server” on page 164 because the Samba schema must first be
added to LDAP. Detailed information about this topic are beyond the scope of this book.
12.3.5 Starting Samba at boot time
Samba can be started for the current session using the service command and at boot time
using the chkconfig command:
# service smb start
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
# chkconfig smb on
Samba should now be running and configured to start at boot time.
12.3.6 Testing your changes
You can verify that Samba is running using the following service command:
# service smb status
smbd (pid 6987 6982) is running...
nmbd (pid 6985) is running...
You can verify the shares that are available using the following smbclient command:
# smbclient -U sambauser1 -L localhost
Password:
Domain=[LAT123] OS=[Unix] Server=[Samba 3.0.23c-2]
Sharename Type Comment
--------- ---- -------
sharedoc Disk RHEL 5.2 on System z documentation
IPC$ IPC IPC Service (Samba Server)
sambauser1 Disk Home Directories
Domain=[LAT123] OS=[Unix] Server=[Samba 3.0.23c-2]
...
You can test getting a Samba share from a Windows desktop. Go to any Windows Explorer
window (such as My Computer) and select Tools -> Map Network Drive. Use the Universal
Naming Convention (UNC) to specify the Samba server and share name as shown in the
upper left corner of Figure 12-2. In this example the UNC is \\9.12.5.33\sharedoc.
Comentarios a estos manuales