LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-31-2017, 06:57 AM   #1
ozinsta
LQ Newbie
 
Registered: May 2017
Posts: 2

Rep: Reputation: Disabled
Bash script stuck in loop


I haven't worked with linux at all but have worked as a consultant for 30 years and have worked with a number of other scripts, I download an iso to remove the syskey from a friend's computer whose wife had called "windows microsoft" and the script worked fine to remove syskey but didn't remove the administrator password so I ran it again and it gets to the point where it says it removed the password but won't go back to the previous menu so you can save your changes to the registry. All choices take you back to the same spot in the script. Hopefully this is the right forum for this question and since you have no idea what the script looks like you will have some suggestion on what I should try next. Thanks in advance.
 
Old 05-31-2017, 07:06 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,773

Rep: Reputation: 7565Reputation: 7565Reputation: 7565Reputation: 7565Reputation: 7565Reputation: 7565Reputation: 7565Reputation: 7565Reputation: 7565Reputation: 7565Reputation: 7565
Welcome to LQ!
Quote:
Originally Posted by ozinsta View Post
Hopefully this is the right forum for this question and since you have no idea what the script looks like you will have some suggestion on what I should try next. Thanks in advance.
Yes, you are right. But without showing us your script/work hard to say anything.

You can insert set -xv at the beginning of your script to see what's happening. Also you may try www.shellcheck.net to check your code.

Last edited by pan64; 05-31-2017 at 07:11 AM.
 
1 members found this post helpful.
Old 05-31-2017, 07:50 AM   #3
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Is it this, discussed in this / the later part of this?
(found from this web-search: "linux script" remove syskey)

Alt+F2 will get you a shell prompt. ps will show /scripts/... ENJOY Linux

Last edited by Jjanel; 05-31-2017 at 08:09 AM.
 
1 members found this post helpful.
Old 05-31-2017, 07:50 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,894
Blog Entries: 13

Rep: Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945
Quote:
Originally Posted by ozinsta View Post
I haven't worked with linux at all but have worked as a consultant for 30 years and have worked with a number of other scripts, I download an iso to remove the syskey from a friend's computer whose wife had called "windows microsoft" and the script worked fine to remove syskey but didn't remove the administrator password so I ran it again and it gets to the point where it says it removed the password but won't go back to the previous menu so you can save your changes to the registry. All choices take you back to the same spot in the script. Hopefully this is the right forum for this question and since you have no idea what the script looks like you will have some suggestion on what I should try next. Thanks in advance.
Hi ozinsta and welcome to LQ,

Please post this script. Are you able to view it yourself and look at the script, or do you need assistance with performing that portion?
 
Old 05-31-2017, 08:04 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
well looks like a exe program to me, NOT a script. it also is windows this is Linux, if it is a script well guess what, Windows has scripts too, Java has scripts, bsd has scripts, UNIX has scripts, etc...

scripts are not exclusively Linux. This is an exe file -- I already tried looking into everything that is able to be opened and read as most of it is a compiled binary -- well binary is not a script. This is not a script that is doing this operation. even though it that executable is called

syslinux.exe

Quote:
***************************************************************************
* *
* Windows NT/2k/XP/Vista Change Password / Registry Editor / Boot CD *
* *
* (c) 1998-2008 Petter Nordahl-Hagen. Distributed under GNU GPL v2 *
* *
* DISCLAIMER: THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTIES! *
* THE AUTHOR CAN NOT BE HELD RESPONSIBLE FOR ANY DAMAGE *
* CAUSED BY THE (MIS)USE OF THIS SOFTWARE *
* *
* More info at: http://home.eunet.no/~pnordahl/ntpasswd/ *
* Email : pnordahl@eunet.no *
***************************************************************************

Just boot this CD and follow instructions.
Usually, just pressing return/enter should work, except some
drivers (ISA for instance) may have to be loaded manually with
the 'm' menu option after boot.

---

The password reset and registry edit has now been tested with the following:

NT 3.51, NT 4, Windows 2000, Windows XP, Windows 2003 Server,
Vista and Server 2008.

As far as I know, it will work with all Service Packs (SP) and
all editions (Professional, Server, Home etc)
Also, 64 bit windows version (XP, 2003, Vista, 2008) shold be OK.

---

To make a bootable USB drive / key:

1. Copy all files from this CD onto the USB drive.
It cannot be in a subdirectory on the drive.
You do not need delete files already on the drive.
2. Install the bootloader (you may have to be administrator)
On the USB drive, there should now be a file "syslinux.exe".
Run this from a command line, like this:


j:\syslinux.exe -ma j:

replace j with some other letter if your USB drive is on another
drive letter than j:
On some drives, you may have to omit the -ma option if you
get an error.
If it says nothing, it probably did install the bootloader.

Please note that you may have to adjust settings in your computers BIOS
setup to boot from USB.
Also, some BIOS (often older machines) simply won't boot from USB anyway.
Unfortunately, there are extremely many different versions of BIOS,
and a lot of them are rather buggy when it comes to booting off different
media, so I am unable to help you.
retraction:

this thing was posted by Jjanel and not OP but then I do hope OP DL this and it works for him.

Last edited by BW-userx; 05-31-2017 at 08:13 AM.
 
Old 05-31-2017, 08:31 AM   #6
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
A Linux.iso (cd080802) that's half the 7MB size of the distro I use! Fits in a 16MB VBox
Remember to hit Alt+F2 and enjoy [web-researching] busybox! (its bourne shell [ash?] is a SUBSET of bash)
Yes, all those scripts are in /scripts. Have a look around (myBW-hero)
What an Advanced Intro to Linux, for someone (OP) who's never seen Linux before!

Bottom line: #2, yes: @OP #1, let us know exactly what you are referring to.

Last edited by Jjanel; 05-31-2017 at 09:24 AM.
 
1 members found this post helpful.
Old 05-31-2017, 09:35 AM   #7
ozinsta
LQ Newbie
 
Registered: May 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Followup

I found an updated version of the file, or a similar one, which worked; it is called cd140201.zip, it looks similar when run but actually goes back to the previous menu so you can save the sam hive. Thanks for the suggestions, I am busy cleaning the computer before I give it back to them. I will try the failed iso on a test computer to see if it works when the computer hasn't been compromised by the "windows microsoft" group.
 
1 members found this post helpful.
Old 06-03-2017, 07:29 PM   #8
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Thanks for the cd140201 update! (When done here, use ThreadTools at top to mark 'Solved')

p.s. "crazy" : IF you have XP-up with 1G-up ram, you can run VBox, several cd drives/.iso
and diff those /scripts (IF you really want to 'beat a dead cd' )

Last edited by Jjanel; 06-03-2017 at 07:32 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to loop over text file lines within bash script for loop? johnpaulodonnell Linux - Newbie 9 07-28-2015 03:49 PM
Bash script issue (for loop inside a loop) Mperonen Programming 3 08-08-2013 02:14 AM
[SOLVED] Bash Script for loop sunveer Programming 8 09-10-2012 11:42 AM
[SOLVED] 'for' loop in bash script vjramana Programming 6 05-13-2012 10:04 AM
Stuck in Bash for loop devn Programming 15 09-29-2007 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration