#71420 - 2002-11-06 06:27 PM
Re: local admin
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
if ingroup("@wksta\administrators") shell 'cmd /c net group administrators @userid /del' endif
|
|
Top
|
|
|
|
#71424 - 2002-11-09 08:51 AM
Re: local admin
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Please post your exact code or command.
|
|
Top
|
|
|
|
#71432 - 2002-11-10 07:26 PM
Re: local admin
|
Jeroen
Starting to like KiXtart
Registered: 2001-08-16
Posts: 180
Loc: Netherlands
|
P.s.
And if you're using multiple domains, trusts, and all such things, (or plan on using them) you should maybe add the domain where the useraccount resides too in your shell command.
_________________________
Regards, Jeroen.
There are two ways to write error-free programs. Only the third one works.
|
|
Top
|
|
|
|
#71435 - 2002-11-11 05:26 AM
Re: local admin
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
If you have W2K, use a policy. Or if NT4, use an Admin script to only allow Admninistrators to "Access this computer from the network" .
Access this computer from the network
|
|
Top
|
|
|
|
#71437 - 2002-11-11 05:52 AM
Re: local admin
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
These are the things you may want to read up on.
LsaAddAccountRights Grants privileges to a sid. To convert account names to sid's use LsaLookupNames. Be really carefully with the sid. If the sid does not belong to a user, LsaAddAccountRights creates a new user without a user name.
LsaRemoveAccountRights Removes privileges from a sid. To convert account names to sid's use LsaLookupNames. If the optional parameter $all is not null, all privileges for $sid will be removed. In this case, @privileges has no meaning. Note: there is a mistake in the documentation from Microsoft (see the platform sdk). If you remove all privileges with the $all parameter the account won't be deleted.
The right is SE_NETWORK_LOGON_NAME.
Unfortunately, I only know how to access them via Perl at this time. Maybe someone else can add more information or provide a way to search and destroy your unathorized shares.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2924 anonymous users online.
|
|
|