A place to discuss Backup software and online services
You are not signed in.
Pages: 1
I'd love to be able to automatically login to IDrive, whenever I boot up. Second best option would be to create a script that will log me in automatically, that I can run AFTER booting up, that is: without having to type in my username, password, and encryption key. I'm the only one using this computer, so security issues are zilch. Thanks!
Offline
I don't use these scripts myself, but I've had a look at them and I noticed in account_setting.pl there are input statements for Usermame, Password and Encryption key.
# Get user name and validate
my $uname = Common::getAndValidate(['enter_your', " ", $AppConfig::appType, " ", 'username', ': '], "username", 1);
$uname = lc($uname); #Important
my $emailID = $uname;
# Get password and validate
my $upasswd = Common::getAndValidate(['enter_your', " ", $AppConfig::appType, " ", 'password', ': '], "password", 0);
Couldn't you just modify these lines to assign your details directly?
# Get user name and validate
#my $uname = Common::getAndValidate(['enter_your', " ", $AppConfig::appType, " ", 'username', ': '], "username", 1);
my $uname = "zeke";
$uname = lc($uname); #Important
my $emailID = $uname;
# Get password and validate
#my $upasswd = Common::getAndValidate(['enter_your', " ", $AppConfig::appType, " ", 'password', ': '], "password", 0);
my $upasswd = "ZekePW123";
Offline
Well, I tried that, but it seems to hiccup over using the "at" symbol, as my username is my email address. And I don't know how to get around that. Here's the result:
zeke@X230:~/IDriveForLinux/scripts$ ./account_setting-AUTO.pl
"my" variable $uname masks earlier declaration in same scope at ./account_setting-AUTO.pl line 119.
Possible unintended interpolation of @sonic in string at ./account_setting-AUTO.pl line 119.
"my" variable $upasswd masks earlier declaration in same scope at ./account_setting-AUTO.pl line 125.
Global symbol "@sonic" requires explicit package name (did you forget to declare "my @sonic"?) at ./account_setting-AUTO.pl line 119.
Execution of ./account_setting-AUTO.pl aborted due to compilation errors.
Or it's something else, I really have no idea, I'm not a programmer in ANY language, including Perl. At any rate, wouldn't it be the "login.pl" file I'd need to edit?
Last edited by Zeke (2021-02-07 23:14:48)
Offline
Did you put a # in front of the existing input statements?
#my $uname = Common::getAndValidate(['enter_your', " ", $AppConfig::appType, " ", 'username', ': '], "username", 1);
#my $upasswd = Common::getAndValidate(['enter_your', " ", $AppConfig::appType, " ", 'password', ': '], "password", 0);
Regarding the @ symbol, apparently Perl tries to interpret it, so you need to escape it, for example:
my $uname = "zeke\@domain.com";
I'm not familiar with Perl either, we live and learn!
As to whether you should be doing this in login.pl - may be!
Offline
Further to my comment about login.pl - yes, maybe copy it to a new file called loginauto.pl and modify it so that the username, password and encryption key are assigned automatically.
Offline
SteveA wrote:
Did you put a # in front of the existing input statements?
No, because those statements I changed directly...I didn't copy and paste them to duplicate, then comment out the original statement.
#my $uname = Common::getAndValidate(['enter_your', " ", $AppConfig::appType, " ", 'username', ': '], "username", 1);
#my $upasswd = Common::getAndValidate(['enter_your', " ", $AppConfig::appType, " ", 'password', ': '], "password", 0);
I have no idea where to type in my username and password. Maybe between those paired but empty quote marks? Or replace double-quoted "username" and "password" at the end there?
[Regarding the @ symbol, apparently Perl tries to interpret it, so you need to escape it, for example:
my $uname = "zeke\@domain.com";
Okay, got it, thanks.
I'm not familiar with Perl either, we live and learn!
As I like to say: "I couldn't hack my way out of a virtual paper bag!"
As to whether you should be doing this in login.pl - may be!
I think it's fine to change the filename...however, I can always stick to the original, after first backing it up as "login-ORIGINAL.pl". I just need to figure out where to type in the username and password...as well as the encryption key! Thanks!
Maybe I'll send a query on this to IDrive support, about creating an automated script. They just asked me to run "send_error_report.pl" and include the ticket number before sending it off to them. This is about finding out why my backup stopped at 18%.
As for your theory that it does not resume from where you left off...IIRC in Windows it DID resume at the percentage point from where I stopped. Anyway, let's see what they have to say.
Last edited by Zeke (2021-02-08 03:40:58)
Offline
Zeke wrote:
SteveA wrote:
Did you put a # in front of the existing input statements?
No, because those statements I changed directly...I didn't copy and paste them to duplicate, then comment out the original statement.
#my $uname = Common::getAndValidate(['enter_your', " ", $AppConfig::appType, " ", 'username', ': '], "username", 1);
#my $upasswd = Common::getAndValidate(['enter_your', " ", $AppConfig::appType, " ", 'password', ': '], "password", 0);I have no idea where to type in my username and password. Maybe between those paired but empty quote marks? Or replace double-quoted "username" and "password" at the end there?
Regarding the @ symbol, apparently Perl tries to interpret it, so you need to escape it, for example:
my $uname = "zeke\@domain.com";
Okay, got it, thanks.
What I meant was, you get rid of the whole line containing "getAndValidate" (by commenting it out) and add a new line with just my my $uname = "zeke\@domain.com"
getAndValidate is a function that takes keyboard input and assigns it to the variable $uname, but we want to just hard-code it.
Zeke wrote:
As to whether you should be doing this in login.pl - may be!
I think it's fine to change the filename...however, I can always stick to the original, after first backing it up as "login-ORIGINAL.pl". I just need to figure out where to type in the username and password...as well as the encryption key! Thanks!
my $encKey = Common::getAndValidate(["\n", 'enter_your', " encryption key: "], "private_key", 0);
appears many times in login.pl and account_settings.pl so I'm not sure which one you would change - potentially all of them, but it may be that the scripts are designed to handle a number of accounts so it may be a bit more complicated.
Zeke wrote:
Maybe I'll send a query on this to IDrive support, about creating an automated script. They just asked me to run "send_error_report.pl" and include the ticket number before sending it off to them.
See if you can get in contact with Anil Kumar who wrote those scripts. He's on LinkedIn.
I wonder if there's a simpler way to hack these scripts and bypass login - after all, they have already stored your authentication details so that they can run unattended backups from the cron jobs.
Offline
Wow, such excellent suggestions...thanks immensely. I WILL contact Mr. Kumar on this, shortly. Will report back. But I JUST found something interesting:
I rebooted Linux, and then ran the IDrive script, login.pl...and it says I'm already logged in! Hmm. But I rebooted early this morning, when my monitor was blank, and it wouldn't turn back on. I don't use sleep or hibernation mode, but DO have the system set to turn the screen blank after ten minutes of no activity. Usually, once I tap a key or do a mouse click, the screen turns back on. But I've found that it sometimes fails to do that after leaving the system inactive overnight. So, that forced shutdown (by keeping the power button pressed), may have something to do with my still being logged on to IDrive...by possibly restoring my current online activities before the shutdown.
Egads...just one thing after another...you can't make this stuff up!
Last edited by Zeke (2021-02-08 18:59:40)
Offline
Pages: 1