Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Mac Script Problems
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="xXRiLeYXx" data-source="post: 1358681" data-attributes="member: 234506"><p>Okay. I will say that I came from another forum searching for help, as no one there really knows anything about Mac scripts, but seem to know everything else about FreeBSD, Linux, and of course Windows.</p><p></p><p>I know many languages including those like C++ and Java, and I know a bit about the Mac syntax and a couple of it's commands, but I am stumbling when it comes to this script as I have never written a shell script for mac.</p><p></p><p>Can someone please help me and tell me what I am doing wrong?</p><p></p><p>[CODE]#!/bin/bash</p><p>echo Enter Username:</p><p>read user</p><p>sudo dscl localhost -read /Search/Users/$user | grep GeneratedUID | cut -c15-</p><p>echo Copy above line for GUID:</p><p>read guid</p><p>sudo cat /var/db/shadow/hash/$guid | cut -c169-216</p><p>echo Above is the mac hash...[/CODE]</p><p></p><p>Any help is appreciated.</p></blockquote><p></p>
[QUOTE="xXRiLeYXx, post: 1358681, member: 234506"] Okay. I will say that I came from another forum searching for help, as no one there really knows anything about Mac scripts, but seem to know everything else about FreeBSD, Linux, and of course Windows. I know many languages including those like C++ and Java, and I know a bit about the Mac syntax and a couple of it's commands, but I am stumbling when it comes to this script as I have never written a shell script for mac. Can someone please help me and tell me what I am doing wrong? [CODE]#!/bin/bash echo Enter Username: read user sudo dscl localhost -read /Search/Users/$user | grep GeneratedUID | cut -c15- echo Copy above line for GUID: read guid sudo cat /var/db/shadow/hash/$guid | cut -c169-216 echo Above is the mac hash...[/CODE] Any help is appreciated. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Mac Script Problems
Top