log in to domain with script

2004-06-06 Thread Ronen Kfir
Hi, I work in a windows 2000 environment. Need to check & find out the users who haven't changed their password from the default password given to them when the user was opened. I want to the script will make a log in to the domain with each user, & try to do it with the default password. For t

WIN2K Active Directory qtn. execute system command with login script.

2004-03-01 Thread Ronen Kfir
Hi, I have a command line tool (tscmd), which works fine on single user. My goal is to change TS profile for Organization Unit user. I want to put a login script inside a GPO of this OU in order to do it. What I miss is how to create the array of users included in this Organization Unit, so I can r

users profile path- windows 2000

2004-02-23 Thread Ronen Kfir
Hi, I want to change the profile path to a bulk of users with a Perl script. Have tried this: Win32::AdminMisc::UserSetMiscAttributes USER_PROFILE & got this: Can't locate Win32/AdminMisc/UserSetMiscAttributes.pm in @INC. Why is that so, while Win32::AdminMisc is installed!? Tried t

RE: basic explanation on code

2004-02-13 Thread Ronen Kfir
.. Thanx a lot! R o n e n K f i r System Administrator CIT div. Tel Aviv University Israel Tel: 972-3-6407416 Fax: 972-3-6405158 cellular: 972-55-405910 E-mail: [EMAIL PROTECTED] -Original Message- From: Jan Eden [mailto:[EMAIL PROTECTED] Sent: Friday, February 13, 2004 4:39 PM

basic explanation on code

2004-02-13 Thread Ronen Kfir
#!/usr/bin/perl %machines =(user1, 'booboo', user2, 'puter', user3, 'synta', user4, 'synta'); for $key (keys %machines) { $val=$programs{$key} if (!defined $supliers{$val}) { $supliers{$val}=1; } else

RE: index

2003-10-01 Thread Ronen Kfir
Sorry about the last one. I wrote some test & somehow it flipped away! The following script meant to calculate simple math drills, such as 5 * 9 or 4 + 3, written in one line. What I cannot comprehend is the lines marked with ---. What do they do? Why is there a "0 < index..." Oh, it all makes

index

2003-10-01 Thread Ronen Kfir
Hi, my $line = ; chomp $line; my $first_space = index($line , " "); my $a = substr($line, 0, $first_space); my $last_space = rindex($line , " "); my $b = substr($line, $last_space+1); if (0 < index($line, "*")) { print $a * $b, "\n"; } if (0 < index($line, "+")) { print $a + $b,

looking at a string

2003-09-02 Thread Ronen Kfir
Hi, This code is taken from "learning Perl\ Schwartz & Phoenix. sub big_money { $number = sprintf " %.2f", shift @_; 1 while $number =~ s/^(-?\d+) (\d\d\d) /$1, $2/; $number=~ s/^(-?)/$1\$; $number; } In the book they write the no. 12345678.90 as the no. of example. What I

while loop

2003-08-28 Thread Ronen Kfir
quot; loop (at the bottom), & replace it with "while", so it will unlink files as much as needed to get below % ratio number. How do I do it? thanx Ronen Kfir System Administrator CIT div. Tel Aviv University Tel: 972-3-6407416 Fax: 972-3-6405158 cellular: 972-55-405910 E-mail: [EMAIL PROTECTED]

unlink output of printf

2003-08-21 Thread Ronen Kfir
I need to delete oldest modified file in a directory. I find this file with this: my $oldest= printf "%s\n", (sort{ (-M $b) <=> (-M$a) } glob("v:\*")); print $oldest; unlink "$oldest"; What I get in response is: oldest_filename 1 File is not delete

Perl on Visual studio

2003-07-13 Thread Ronen Kfir
? Ronen Kfir System Administrator T.A.U Computing Division Tel: 972-3-6407416 Fax: 972-3-6405158 cellular: 972-55-405910 E-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

create files in multi directories

2003-07-08 Thread Ronen Kfir
ory tree is the files name. The uncommon thing is the text. In each set, the text stays the same, but only one word- changes. The word, which supposes to be changed, is known- by location in the template. Cheers ?Ronen Kfir System Administrator T.A.U Computing Division Tel: 972-3-6407416 Fa

RE: Disk space on windows 2000

2003-07-03 Thread Ronen Kfir
I work with ActiveState version. Downloaded Win32::AdminMisc from ftp://www.roth.net/pub/ntperl/adminmisc/20030625/Bin Can't locate ADMINMISC_XXX.PLL. What am I missing? Thanks Ronen ?Ronen Kfir System Administrator T.A.U Computing Division Tel: 972-3-6407416 Fax: 972-3-6405158 cellular

RE: create files in multi directories

2003-07-02 Thread Ronen Kfir
uncommon thing is the text. In each set, the text stays the same, but only one word- changes. The word, which supposes to be changed, is known- the location in the template, the source & destination. Cheers ?Ronen Kfir System Administrator T.A.U Computing Division Tel: 972-3-6407416 Fax: 9

create files in multi directories

2003-07-02 Thread Ronen Kfir
Hi, How would I create a bunch of files with the same name, save them under the same root directory, but only in part of the subdirectories & change one word in the text inside the files? ?Ronen Kfir System Administrator T.A.U Computing Division Tel: 972-3-6407416 Fax: 972-3-6405158 Cell

Disk space on windows 2000

2003-07-01 Thread Ronen Kfir
Hi, I was looking around google, & couldn't find it: how do I get a disk situation report on WIN2K? I want to delete the oldest log files beyond x% out off disk space. Ronen Kfir System Administrator T.A.U Computing Division Tel: 972-3-6407416 Fax: 972-3-6405158 cellular: 972-55-4059

RE: File::Find

2003-06-22 Thread Ronen Kfir
his code peace : @ARGV = qw(/Big_Brother/attachments) unless @ARGV; use File::Find; #open DOWN > @down; find sub { print $File::Find::name, -f && '*', "\n" }, @ARGV; this marked all files with a * at the end. How do I put those paths I find to an array, so I

RE: readir

2003-06-19 Thread Ronen Kfir
To make a long story short: I need the readdir switch (or anything else) for digging into subdir, & a way to put the paths I find in array/hash. Am I clear enough now? P.S. I work on Linux, ? ?Ronen Kfir System Administrator T.A.U Computing Division Tel: 972-3-6407416 Fax: 972-3-6405158 cellula

readir

2003-06-19 Thread Ronen Kfir
path of those files. Then conditioned to each path the readdir found, pick up some other file from that directory & attach it to a mail message. The part of the attachment to a mail message I have. What I miss is all the rest I have described. Thank you ?Ronen Kfir System Administrat

treating multiple objects matching other multiple objedts.

2003-06-18 Thread Ronen Kfir
, ) or die "Error creating mail message: $!\n"; $msg->attach ( Path =>$attachment_up, Filename=>'up.asc', ) or die "Error adding the text message part: $!\n"; MIME::Lite->send('smtp', $mail_host, Timeout=>60); $msg->send; unlink $trigger_up; _ ?Ronen Kfir System Administrator T.A.U Computing Division Tel: 972-3-6407416 Fax: 972-3-6405158 cellular: 972-55-405910 E-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

script for deleting server log files

2003-02-23 Thread Ronen Kfir
Hi, I have log files on an IIS web server (WIN2K), that I want to delete after a couple of days, lets say -14. I want the script to run under a schedule, and delete those files. Please help! Thanx Ronen