Accessing SMB from AIX on Synology
#1
Accessing SMB from AIX on Synology
Well we're at it again, it turns out the FTP from AIX to the Synology kept corrupting files (even though binary mode was on) so that's a no-go as well, it wasn't very elegant with how primitive AIX's built in command line FTP was anyways. After burning the NFS and FTP bridges we're now down to SMB(CIFS).

AIX 5.3 ~ 7.1 support CIFS but you must manually install the bos.cifs packages. On 5.3 and 6.1 you can just use the graphical system manager -> software -> overview and tasks -> install software, then point to the AIX DVD and browse through the bos packages until you find the following and select them:
  • bos.cifs_fs.rte
  • bos.cifs_fs.smit
Once they're installed then they'll unlock the ability to use mount -v cifs and smit cifs_fs. Before you proceed there are two big caveats to note of otherwise you may be scratching your head why the mounts keep failing:
#1 SMB/CIFS on AIX only supports a maximum of 14 characters for the password (create a special account to meet those password requirements)
#2 SMB/CIFS on AIX only supports SMBv1 (enable SMB1 support minimum on your synology)

For some strange reason always on AIX 5.3, it does not like resolving the IP addresses of my Synology (possibly due to my pihole) -- it was a lot better in 7.1. At any rate hold onto your seat because adding a local HOSTS entry in AIX is not as straightforward as it should be. If you edit etc/hosts AIX (and BSD as a whole, maybe all UNICES too, dunno) ignores it by default. Why is this important? Well if you attempt to run mount -v cifs and the IP address can't resolve to a host name it will fail with: "The IP address is not getting resolved.", both have to be functioning for AIX SMB. Unfortunately smit cifs_fs is programmed so poorly that if you use it for mounting it will just say: "There is some problem with Add/Mount. Please check the input values." and not actually tell you the REAL reason behind its failure--this pissed me off because I had no idea what was happening for awhile. So much for SMIT being useful for actually setting things up.

#1 Add the IP address and host name entry in etc/hosts, AND THEN MAKE SURE YOU ADD BLANK SPACES AFTER THE LAST LINE. If the entry you're putting in (that you need) just so happens to be the last entry in the file with no blank spaces after it, IT WILL BE IGNORED! I never in a million years would assume you need blank spaces after the last line in a config, usually that's bad practice, but I guess not in the twisted world of GCC and BSD.
#2 Add the entry hosts=local,bind at the bottom of etc/netsvc.conf
#3 Restart AIX network services with refresh -s inetd

Then after that you should finally be able to ping (hostname) and it should return the defined IP address in etc/hosts

Next up create the folder in /mnt, I chose "synology", so my directory is: /mnt/synology
Then bust open a terminal and run this command:
# mount -v cifs -n 1.1.1.1/aixuser/aixpassword -o uid=201,fmode=750 /SMBsharename /mnt/synology

Replace '1.1.1.1' with the IP address of your synology
Replace 'aixuser' with a valid user account on your synology that has access to the SMB share (preferably an administraotr)
Replace 'aixpassword' with the password for said synology account
Replace 'SMBsharename' with the actual shared folder name
Replace '/mnt/synology' with where-ever you're mounting it, if the folder doesn't already exist you will be denied the mount

And then once that is done the command will run, and if successful it'll just bring you back to the terminal's cursor.


*phew*

P.S. I didn't really like IBM's official documentation on it tbh, it could have been written more succinctly and mention the pitfalls I ran into (in fact it falsely claims you can just use the IP address when the hostname can't resolve when it does need to be able to be resolved): https://www.ibm.com/support/knowledgecen...intro.html

"Unlike Windows, OS/2 is a true operating system" - Steven S. Ross, How to Maximize Your PC
(This post was last modified: 07-06-2020, 03:36 PM by micrex22.)
micrex22
PS/2 it!

Trade Count: (0)
Posts: 144
Threads: 27
Joined: May 2018
Find Reply
07-06-2020, 08:22 AM
#2
RE: Accessing SMB from Synology on AIX
^ Eek.

Just for the heck of it, is there an aftermarket ftp client that you could try ? Seems like a heck of a lot easier ...
hamei
broke-down old clunker

Trade Count: (0)
Posts: 380
Threads: 3
Joined: Jul 2019
Location: 上海
Find Reply
07-06-2020, 11:30 AM
#3
RE: Accessing SMB from Synology on AIX
(07-06-2020, 11:30 AM)hamei Wrote:  ^ Eek.

Just for the heck of it, is there an aftermarket ftp client that you could try ? Seems like a heck of a lot easier ...
Well it's working fine now for my purposes -- yes there are some FTP clients Michael Perzl compiled that I will be using later. However, because I need to resolve so many dependency problems SMB and/or NFS make more sense so you can dynamically shift things around and get AIX to read the package paths on the fly with other changes. If you're referring to an alternative FTP client for BEFORE you set up SMBv1, there are none because you run into the chicken and egg problem.

I'm now undergoing a huge task on trying to get everything functioning (it's worth adding that I've not been able to get OSS/AIX successfully installed yet and that's also being investigated on top of the application issues).

There's some things that need to be done after a fresh AIX install that aren't installed by default.

It is on my list to hopefully create an .ISO image with all of the utilities ordered so that you can just pop a DVD in and bang through the lists with all dependencies and problems taken care of, but it's going to take awhile to figure out since I'm the only person in the world doing this atm.

"Unlike Windows, OS/2 is a true operating system" - Steven S. Ross, How to Maximize Your PC
micrex22
PS/2 it!

Trade Count: (0)
Posts: 144
Threads: 27
Joined: May 2018
Find Reply
07-06-2020, 03:34 PM


Forum Jump:


Users browsing this thread: 1 Guest(s)