Skip to content

Conversation

@LeslieOA
Copy link

Quick and dirty macOS support.
Early. Likely buggy.

Screenshot 2024-06-16 at 01 15 36

@AnarchistHoneybun
Copy link
Contributor

hello, the script currently doesn't show any printing errors for last login date_time and ip:
image
in your attached output it's a bit off though; could you verify this once, since I'm not getting a similar error on my own mac implementation of this

@neilpanchal
Copy link
Contributor

Thanks, I will test this out. I am liking this idea of having a separate file for each "group" of operating systems. i.e., darwin, linux, bsd, etc.

@LeslieOA
Copy link
Author

hello, the script currently doesn't show any printing errors for last login date_time and ip: image in your attached output it's a bit off though; could you verify this once, since I'm not getting a similar error on my own mac implementation of this

Heya @AnarchistHoneybun. I'll double check this later this evening (BST).
You get a local IP address instead of the day, right?

When you have a moment, could you post the output of uname -a; system_profiler SPHardwareDataType on your Mac please?

Here's what mine outputs:

Last login: Wed Jun 19 14:45:47 on ttys011
leslieoa@localhost ~ % uname -a; system_profiler SPHardwareDataType; echo $SHELL

Darwin localhost.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 arm64
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: Mac14,10
      Model Number: FNW93B/A
      Chip: Apple M2 Pro
      Total Number of Cores: 12 (8 performance and 4 efficiency)
      Memory: 16 GB
      System Firmware Version: 10151.121.1
      OS Loader Version: 10151.121.1
      Serial Number (system): T0QGX5VYF5
      Hardware UUID: 8FF17AAE-7CC1-59F1-8692-20804BB9A678
      Provisioning UDID: 00006020-000A19481A20C01E
      Activation Lock Status: Enabled

/bin/zsh

Reference(s):

@LeslieOA
Copy link
Author

Thanks, I will test this out. I am liking this idea of having a separate file for each "group" of operating systems. i.e., darwin, linux, bsd, etc.

Hi @neilpanchal! Love your creative work (USGC) on "Twitter", which brought me to your repo.

Yes, I figured this approach would reduce maintenance and allow for platform-specific tweaks and features where needed. Additionally, a main Bash script can identify the appropriate platform-specific file to run. This mini-modularity could prove useful.

Hope you like it.

@AnarchistHoneybun
Copy link
Contributor

hello, the script currently doesn't show any printing errors for last login date_time and ip: image in your attached output it's a bit off though; could you verify this once, since I'm not getting a similar error on my own mac implementation of this

Heya @AnarchistHoneybun. I'll double check this later this evening (BST). You get a local IP address instead of the day, right?

When you have a moment, could you post the output of uname -a; system_profiler SPHardwareDataType on your Mac please?

Here's what mine outputs:

Last login: Wed Jun 19 14:45:47 on ttys011
leslieoa@localhost ~ % uname -a; system_profiler SPHardwareDataType; echo $SHELL

Darwin localhost.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 arm64
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: Mac14,10
      Model Number: FNW93B/A
      Chip: Apple M2 Pro
      Total Number of Cores: 12 (8 performance and 4 efficiency)
      Memory: 16 GB
      System Firmware Version: 10151.121.1
      OS Loader Version: 10151.121.1
      Serial Number (system): T0QGX5VYF5
      Hardware UUID: 8FF17AAE-7CC1-59F1-8692-20804BB9A678
      Provisioning UDID: 00006020-000A19481A20C01E
      Activation Lock Status: Enabled

/bin/zsh

Reference(s):

* `uname`: [Wikipedia](https://en.wikipedia.org/wiki/Uname)

* `system_profiler`: [Apple Support documentation](https://support.apple.com/en-by/102767)

sorry for getting back on this so late, I ran the command and then forgot to post the results for some reason. It's the exact same field and formatting as yours, so I don't think that's a problem. that particular section is supposed to show who logged in last to the system, and afaik it also handles remote logins (my above screenshot is from an ubuntu machine in one such session). You might want to check how your program is extracting the last_login_ip field if that's the functionality you intend too, and if not, it's probably better to drop/rename that field in the script to avoid confusion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants