(System: ONTAP 6.5.5)
From the NetApp admin perspective, it would sometimes be very useful to be able to issue, via scripts, a command: cifs terminate username
Alas, this does not seem possible. The nearest seems to be the sequence: cifs sessions username <human-read multiple-line output to extract a workstation name: wsname> cifs terminate wsname
whose middle step is not script-friendly.
<background> The underlying reason is that we sometimes change someone's username (don't ask!). This requires us correspondingly to rename the final component of their home directory. We do this from the UNIX admin host, (as "mv /path/to/oldname /path/to/newname") but this fails if the user has a CIFS session active. </background>
So an alternative to the above strategy would be a NetApp command that could do the necessary rename of the directory. (There doesn't seem to be an "mv" or similar, although I do see an "mv" under priv/advanced... but I'm always slightly nervous around priv/advanced.)
Any thoughts?