Re: W2K8 TS. Printer Security

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello Priya;

Problem was solved.

Example Solution;

TS Clinet Printer Name: Oki ML3320 (redirected 1)
TS Name: W2K8TS
TS User Name: RTUser1
Download setacl http://sourceforge.net/project/showfiles.php?group_id=69165
setacl extract c:\setacl

@echo Remote Connection LPT1 Port Maping
cd\
cd setacl
@echo Printer take ownership and permission
SetACL.exe -on "Oki ML3320 (redirected 1)" -ot prn -actn setowner -ownr
“n:W2K8TS\RTUser1”
SetACL.exe -on "Oki ML3320 (redirected 3)" -ot prn -actn ace -ace
"n:W2K8TS\RTUser1;p:full"
@echo Printer sharing
rundll32 printui.dll,PrintUIEntry /Xs /n "Oki ML3320 (redirected 1)"
sharename "RTUser13320" attributes +Shared
@echo Printer LPT1
net use lpt1 \\W2K8TS\RTUser13320

Thank you.
Best regards.

"Priya Raghavan [MSFT]" wrote:

Sorry, I didnt understand your query. The below APIs will require you to
write a tool in C/C++. If you want only a script or batch file using print
commands, you have to contact the "printers" newsgroup for more info.

--
Thanks,
Priya.

http://blogs.msdn.com/ts
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Emre Demirci" <EmreDemirci@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:018CAB98-C244-44DA-B6E0-2966212E64AA@xxxxxxxxxxxxxxxx
Hello Priva,

I do not have information I will write Scrip. However, if I use the script
ready. Regulating the ownership and permissions of the print command I get
there ?

Thanks you,
Best Regards.

"Priya Raghavan [MSFT]" wrote:

Hi,

These are the Windows APIs to automate step 1 and 2. I am not sure of a
script or batch command to do the same.
If these APIs are not useful, please check with the printers newsgroup.

// Get the Security descriptor for the printer
GetNamedSecurityInfoW(...)

// Get SD control bits
GetSecurityDescriptorControl(...)

// Create the new DACL and initialize it
InitializeAcl(...)

// Copy the ACE's from the old DACL to the new one.
GetAce(...)
AddAccessDeniedAce(...)
AddAccessAllowedAce(...)

// Give the user full privilege
AddAccessAllowedAceEx(...)

// Check the integrity of the new DACL.
IsValidAcl(...)

// Add the new settings to the printer.
SetNamedSecurityInfoW(...)

--
Thanks,
Priya.

http://blogs.msdn.com/ts
--
This posting is provided "AS IS" with no warranties, and confers no
rights.

"Emre Demirci" <EmreDemirci@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BB060C60-CB72-40AF-BBE0-A54BE73425D5@xxxxxxxxxxxxxxxx
Hello,

Dos application LPT1 problem.

4 step
1-Redirected printer-properties-Security-Owner-select user-apply-OK-OK
2-Redirected printer-properties-Security-Select user-Manage Printer
allow
check-apply-OK
3-Start-Run-CMD-rundll32 printui.dll,PrintUIEntry /Xs /n "redirected
printer
name" sharename "sharing name"
4-Net use LPT1 \\computer\sharename

Problem is Printer Security. How to 1 and 2 step script or batch ?

Best regards.

Note: No domain and active directory. Working Workgroup. Terminal
Server
UAC
disable. Trying subinacl.exe "5 - access denied" error.




.



Relevant Pages

  • Re: [Full-disclosure] reduction of brute force login attempts via SSHthrough iptables --
    ... Anyhow its no problem at all to modify, so if you dont like it, just dont use it. ... on a lame script like this as long as it WORKS and is not insecure. ... echo "~ sorting out ip by ip" ... # echo "not enough failed logins, probably no attack from: ...
    (Full-Disclosure)
  • Ripping Tapes with Linux--How To
    ... the full script is located in the BASH ... My tape player is a portable style journalist's recorder from the ... The most irritating part of the recording process was setting the ... echo Starting de-noise procedure to file $TMP1 ...
    (comp.os.linux.misc)
  • Re: Linux Backup with Modification Date Filter?
    ... I wrote a bash script that acts as a wrapper to rsnapshot which first ... generates a modification-date filter, ...
    (comp.os.linux.misc)
  • Re: Command Script variable value lost during execution
    ... The value of RC_ver is numeric but ECHO would return it numeric or not... ... I checked ERRORLEVEL at the end of the script and it was 0 but again ... ECHO RoboCopy version xxx%RC_Ver%yyy ... CALL:GetRCVer RoboCopy.exe /Path ...
    (microsoft.public.windows.server.scripting)
  • Re: Bit Twister: Is this the dhclient-exit-hooks you were talking about?
    ... If you are running the dhclient then all you have to do is ... create the hooks script with YOUR CODE. ... DNS server with my wgets and then restart my firewall. ... You can put an echo statement on commands to show you what will happen ...
    (alt.os.linux)