AIX and CIFS (SMB)
$ lsdev -l nsmb0 -F statusAvailableMount a server share:
# mount -v cifs -n hostname/user/password remote_service /local_mount_pointMake sure you use the service name as defined in smb.conf.
List remote shares anonymously:
$ smbclient [ -s /path/to/smb.conf ] -N -L <servername>Anonymous login successfulDomain=[AIX] OS=[Unix] Server=[Samba 3.3.4] Sharename Type Comment --------- ---- ------- IPC$ IPC IPC Service (samba@myhost)Anonymous login successfulDomain=[AIX] OS=[Unix] Server=[Samba 3.3.4] Server Comment --------- ------- Workgroup Master --------- -------Disable anonymous access (smb.conf):
[global]...restrict anonymous = 2The effect:
$ smbclient -N -L localhostAnonymous login successfulDomain=[AIX] OS=[Unix] Server=[Samba 3.3.4]tree connect failed: NT_STATUS_ACCESS_DENIEDIf 'browseable = no' is set, you cannot list shares anyway...
#======================= Global Settings =====================================[global]workgroup = AIXserver string = samba@myhostsecurity = userlog file = /usr/local/samba/var/log.%mmax log size = 500passdb backend = tdbsamlocal master = yesdomain master = nopreferred master = norestrict anonymous = 2# Uncomment this if you want a guest account, you must add this to /etc/passwd# otherwise the user "nobody" is used; guest account = pcguest; hosts allow = 192.168.1. 192.168.2. 127.; interfaces = 192.168.12.2/24 192.168.13.2/24#============================ Share Definitions ==============================;[homes]; comment = Home Directories; browseable = no; writable = yes[test] path = /data/shared/smb/test browseable = no public = yes only guest = yes writable = yes printable = no guest ok = yesrc.samba, a simple rc script for smbd