FWW: We do user login ID renames from time to time ourselves. We don't do a lot of these so I have not considered scripting this. Our environment is Windows (Ontap 6.5.2R1) so this may not apply to you. If the user does have a CIFS session open I can terminate that session by using Microsoft's MMC to disconnect the user. We do warn them first that that this will happen.
Basically, right click the my computer icon on my PC. Select manage. Right click computer management / connect to different computer and connect to the filer. Find the user's connection then disconnect it.
Seems like a lot of work as the steps are written but I find it to be real simple & quick. I have no idea if it's possible to script this... Vbscript + WMI perhaps?
NOTICE - This communication is intended ONLY for the use of the person or entity named above and may contain information that is confidential or legally privileged. If you are not the intended recipient named above or a person responsible for delivering messages or communications to the intended recipient, YOU ARE HEREBY NOTIFIED that any use, distribution, or copying of this communication or any of the information contained in it is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone and then destroy or delete this communication, or return it to us by mail if requested by us. The City of Calgary thanks you for your attention and cooperation.
-----Original Message----- From: owner-toasters@mathworks.com [mailto:owner-toasters@mathworks.com] On Behalf Of David Lee Sent: Thursday, January 12, 2006 4:56 AM To: toasters@mathworks.com Subject: cifs terminate username?
(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?