Your middle step might be easier if you used the cifs-session-list-iter-start, cifs-session-list-iter-next, and cifs-session-list-iter-end ONTAP APIs. NOW information is at: http://now.netapp.com/NOW/cgi-bin/manageontap. Unfortunately, there is no cifs terminate API at this time, so you would still have to use rsh to do the cifs terminate.
-----Original Message-----
From: David Lee [mailto:t.d.lee@durham.ac.uk]
Sent: Thursday, January 12, 2006 3: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?
--
: David Lee I.T. Service :
: Senior Systems Programmer Computer Centre :
: Durham University :
: http://www.dur.ac.uk/t.d.lee/ South Road :
: Durham DH1 3LE :
: Phone: +44 191 334 2752 U.K. :