Jason Slater Weblog

Managing Information Technology for a UK based Small/Medium Enterprise - With a bit of real life thrown in for good measure.

Mounting a Windows Share under AIX using CIFS

July 3rd, 2008 · 1 Comment

aixwin-jasonslater There are several options for transferring files between AIX and Windows, including NFS, SAMBA, SCP and FTP - all have there advantages and disadvantages but a recent connection method that we have been using is to mount a Windows Share as a CIFS (Common Internet File System) VFS (Virtual File System).

Trying to mount a Windows 2003 Share on an AIX Server (v5.3) using the CIFS virtual file system can be a bit tricky but extremely useful once implemented. Initially CIFS support may require installing unless it is already installed - you can check this by looking in the /sbin/helpers folder for a file mount_cifs

#cd /sbin/helpers
#ls -l

total 488
drwxrwxr-x   2 root     system         1024 Dec 05 2004  jfs2
-r-xr-xr-x   1 root     system        17342 Jul 02 18:20 mount_cifs
-r-x——   1 root     system         3576 Jul 02 18:20 mount_smbfs.

If it is not installed then install it from the Base Operating System CD #1

#installp -ac -d /dev/cd0 bos.cifs_fs

Upon completion a reboot may be required. Ensure the nsmbo device is available by running the lsdev command:

#lsdev

mem0       Available
nsmb0      Available
paud0      Available 01-Q2

Create a username and password in the Windows 2003 domain for handling the share and set the necessary permissions on the share and folder (also consider the use of a $ prefix at the end of the share to hide it). You also need to create a mount point on the AIX machine over which to mount the share (you can just create an empty folder, e.g. mkdir /foldername)

You can then attempt to mount the share over over the mount point.

#mount -v cifs -n node/username/password [-o options] /windowsshare /directory

When I initially ran this I received the following error:

There was an error connecting the share or the server.
Make sure the lsdev command shows that device nsmb0 is in
the Available state.  Also make sure that the share name,
user name and password are accurate.

Checking the Security Log on to Windows Server showed the following event had been raised:

Event Type:    Failure Audit
Event Source:    Security
Event Category:    Logon/Logoff
Event ID:    529
User:        NT AUTHORITY\SYSTEM
Computer:    computername
Logon Failure:
     Reason:        Unknown user name or bad password
     User Name:    username
     Domain:        NODOMAIN
     Logon Process:    NtLmSsp
     Authentication Package:    NTLM
     Workstation Name:    \\workstation
     Source Network Address:    xxx.xxx.xxx.xxx

As I was using a domain the command seemed to require the fmode parameter  and the wrkgrp parameter, so running this command fixed it:

#mount -v cifs -n serverip/username/password -o wrkgrp=domain,fmode=755
/sharename /localmountpoint

More details of the mount command can be found in the IBM Command Reference: mount Command

Tags: Blogging

1 response so far ↓

  • 1 Marx // Aug 6, 2008 at 9:57 am

    Thanks for your note, it helps a lot.

    This parameter was usefull for me :
    -o wrkgrp=test.test,fmode=755,uid=200,gid=201

Leave a Comment