ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Comparing PowerShell to Linux User Manipulation

    IT Discussion
    7
    82
    1.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ObsolesceO
      Obsolesce @scottalanmiller
      last edited by

      @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

      @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

      and if you are typing those a lot, it's about time you make yourself useful and learn to script and automate

      That's easy to say, but there are tons and tons of people out there who use these all day, every day, but cannot automate because they aren't in a uniform environment. Remember the biggest Windows admin group is MSPs, not "single customer environments" and quite an astounding volume of Windows management by industry percentage is done through tools that require environmental-less remote command execution, use CMD not PS (at least by default), and cannot have newer PS versions, and cannot have an automation toolset of any significance.

      I'm sure that there are automation ideas out there even for MSPs. But when you manage thousands of totally disconnected Windows desktops, what is there to automate? Having fast, simple tools that are universally available is about the best that you can do.

      If they are mostly all managing local users, no usable PowerShell, no automation, etc, then why are they using Windows in the first place?

      scottalanmillerS 1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller @Obsolesce
        last edited by

        @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

        If they are mostly all managing local users, no usable PowerShell, no automation, etc, then why are they using Windows in the first place?

        None of those are reasons why people choose Windows. People choose Windows primarily because of app compatibility or familiarity with the GUI environment for end users. If IT alone chose an OS for their own purposes, Windows would never be considered at all, it just doesn't make sense in that way (nor does choosing something in that way.) In fact, MS automation has always been a weak point, so if anything, lacking an ability or need for automation would make the argument for choosing Windows stronger, not weaker.

        But you are also defining PowerShell as "usable" based on extremely new versions. Maybe this is true, but keep in mind that your argument basically is that PowerShell has been a failure for a decade.

        1 Reply Last reply Reply Quote 1
        • F
          flaxking
          last edited by

          It interesting to think about, one complaint about Linux is that it has fragmented off into tons of different distributions, however it's has managed to keep a lot of the tools standardized across them all.

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @flaxking
            last edited by

            @flaxking said in Comparing PowerShell to Linux User Manipulation:

            It interesting to think about, one complaint about Linux is that it has fragmented off into tons of different distributions, however it's has managed to keep a lot of the tools standardized across them all.

            That's very true. It's even moreso than that. Many of those tools remains standard across not just operations systems, but OS familys, too. AIX, Solaris, BSD, Linux... all those families tend to share a lot of tooling.

            1 DustinB3403D 2 Replies Last reply Reply Quote 0
            • 1
              1337 @scottalanmiller
              last edited by

              @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

              @flaxking said in Comparing PowerShell to Linux User Manipulation:

              It interesting to think about, one complaint about Linux is that it has fragmented off into tons of different distributions, however it's has managed to keep a lot of the tools standardized across them all.

              That's very true. It's even moreso than that. Many of those tools remains standard across not just operations systems, but OS familys, too. AIX, Solaris, BSD, Linux... all those families tend to share a lot of tooling.

              It's because the tools aren't linux, it's GNU. Gnu is Not linUx.

              scottalanmillerS 1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @1337
                last edited by

                @Pete-S said in Comparing PowerShell to Linux User Manipulation:

                It's because the tools aren't linux, it's GNU. Gnu is Not linUx.

                Not GNU. The tools predate Gnu. Gnu remade many of them and they are often used across some of those groups, like Linux and BSD, but rarely in others like AIX.

                It's more of just standards.

                1 Reply Last reply Reply Quote 0
                • JaredBuschJ
                  JaredBusch @scottalanmiller
                  last edited by

                  @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                  And you conveniently left out that almost no Windows has this PowerShell stuff, it's non-standard! Only extremely current versions have this without having to go through hoops to install it extra. This isn't universally workable for PowerShell.

                  WTF? What version of Windows are you claiming here? Because PowerShell has been install by default since Windows 7 (PowerShell version 2.0).

                  F scottalanmillerS 2 Replies Last reply Reply Quote 0
                  • JaredBuschJ
                    JaredBusch @Obsolesce
                    last edited by

                    @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                    Create a New Local User
                    New-LocalUser salty #PowerShell - super simple, automatically prompts for password
                    useradd sally #BASH - simple
                    passwd p@ssw0rd #BASH - simple, insecure

                    WTF? Insecure? Are you fucking stupid?

                    Also the correct syntax is passwd salty and guess what, it prompts you to enter the password.

                    How about that, it is not any different between the two systems.

                    ObsolesceO 1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch @Obsolesce
                      last edited by

                      @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                      List Local Users
                      Get-LocalUser #PowerShell - simple.
                      Cat /etc/passwd | grep "/bin/bash" #BASH - good luck!

                      As @scottalanmiller already stated, you don't even know what you are trying to compare here as you, again, used incorrect syntax.

                      grep salty /etc/passwd

                      Real life results from my laptop. Simple colon delimited output.

                      [jbusch@lt-jared ~]$ grep jbusch /etc/passwd
                      jbusch:x:1103:1103:Jared Busch:/home/jbusch:/bin/bash
                      [jbusch@lt-jared ~]$ 
                      
                      ObsolesceO 1 Reply Last reply Reply Quote 1
                      • F
                        flaxking @JaredBusch
                        last edited by

                        @JaredBusch said in Comparing PowerShell to Linux User Manipulation:

                        @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                        And you conveniently left out that almost no Windows has this PowerShell stuff, it's non-standard! Only extremely current versions have this without having to go through hoops to install it extra. This isn't universally workable for PowerShell.

                        WTF? What version of Windows are you claiming here? Because PowerShell has been install by default since Windows 7 (PowerShell version 2.0).

                        And Powershell 2.0 is missing a lot of stuff that are taken for granted by Powershell users today. If WMF was made available through Windows updates, that would have made life easier.

                        scottalanmillerS 1 Reply Last reply Reply Quote 1
                        • scottalanmillerS
                          scottalanmiller @JaredBusch
                          last edited by

                          @JaredBusch said in Comparing PowerShell to Linux User Manipulation:

                          @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                          And you conveniently left out that almost no Windows has this PowerShell stuff, it's non-standard! Only extremely current versions have this without having to go through hoops to install it extra. This isn't universally workable for PowerShell.

                          WTF? What version of Windows are you claiming here? Because PowerShell has been install by default since Windows 7 (PowerShell version 2.0).

                          Who said PowerShell wasn't there? The mistake is thinking that PowerShell does any of the work, it doesn't. CmdLets do. And the CmdLets that do the work aren't part of the PowerShell packages on Windows 7. You can add them manually, just like you can add different versions of PowerShell. But the PS and PS ecosystem that are part of Windows 7 lack the functionality being discussed, like user and group management. You can write really obtuse, lengthy code to do it, but it is absurd and totally impractical.

                          1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller @flaxking
                            last edited by

                            @flaxking said in Comparing PowerShell to Linux User Manipulation:

                            @JaredBusch said in Comparing PowerShell to Linux User Manipulation:

                            @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                            And you conveniently left out that almost no Windows has this PowerShell stuff, it's non-standard! Only extremely current versions have this without having to go through hoops to install it extra. This isn't universally workable for PowerShell.

                            WTF? What version of Windows are you claiming here? Because PowerShell has been install by default since Windows 7 (PowerShell version 2.0).

                            And Powershell 2.0 is missing a lot of stuff that are taken for granted by Powershell users today. If WMF was made available through Windows updates, that would have made life easier.

                            Exactly. PS on Windows 7 basically requires that you either: add in lots of extra stuff that isn't native, use PS in a totally useless way just to prove a point, or fall back to traditional tools called through PS like the net commands. PS was functional in Windows 7 the same way that CMD was functional there... which is to say moderately, but not fully.

                            1 Reply Last reply Reply Quote 1
                            • ObsolesceO
                              Obsolesce @JaredBusch
                              last edited by

                              @JaredBusch said in Comparing PowerShell to Linux User Manipulation:

                              @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                              List Local Users
                              Get-LocalUser #PowerShell - simple.
                              Cat /etc/passwd | grep "/bin/bash" #BASH - good luck!

                              As @scottalanmiller already stated, you don't even know what you are trying to compare here as you, again, used incorrect syntax.

                              grep salty /etc/passwd

                              Real life results from my laptop. Simple colon delimited output.

                              [jbusch@lt-jared ~]$ grep jbusch /etc/passwd
                              jbusch:x:1103:1103:Jared Busch:/home/jbusch:/bin/bash
                              [jbusch@lt-jared ~]$ 
                              

                              That's listing a single user, the context was listing all local users.

                              1 Reply Last reply Reply Quote 0
                              • ObsolesceO
                                Obsolesce @JaredBusch
                                last edited by

                                @JaredBusch said in Comparing PowerShell to Linux User Manipulation:

                                @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                                Create a New Local User
                                New-LocalUser salty #PowerShell - super simple, automatically prompts for password
                                useradd sally #BASH - simple
                                passwd p@ssw0rd #BASH - simple, insecure

                                WTF? Insecure? Are you fucking stupid?

                                Also the correct syntax is passwd salty and guess what, it prompts you to enter the password.

                                How about that, it is not any different between the two systems.

                                Shit yeah I did know that.

                                Still, it's two commands, versus one with PowerShell, unless you write a long one-liner in BASH.

                                scottalanmillerS 1 Reply Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller @Obsolesce
                                  last edited by

                                  @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                                  @JaredBusch said in Comparing PowerShell to Linux User Manipulation:

                                  @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                                  Create a New Local User
                                  New-LocalUser salty #PowerShell - super simple, automatically prompts for password
                                  useradd sally #BASH - simple
                                  passwd p@ssw0rd #BASH - simple, insecure

                                  WTF? Insecure? Are you fucking stupid?

                                  Also the correct syntax is passwd salty and guess what, it prompts you to enter the password.

                                  How about that, it is not any different between the two systems.

                                  Shit yeah I did know that.

                                  Still, it's two commands, versus one with PowerShell, unless you write a long one-liner in BASH.

                                  Yes, still two commands. Although the PS one is interactive. Which still sucks, too. In this case, PS is slightly better, I feel, but net user beats either.

                                  1 Reply Last reply Reply Quote 0
                                  • ObsolesceO
                                    Obsolesce
                                    last edited by

                                    Screenshot_20190421-180851_ReadEra.jpg

                                    1 Reply Last reply Reply Quote 0
                                    • ObsolesceO
                                      Obsolesce
                                      last edited by

                                      Screenshot_20190421-182000_ReadEra.jpg

                                      1 Reply Last reply Reply Quote 0
                                      • scottalanmillerS
                                        scottalanmiller
                                        last edited by

                                        Understood, Windows is basically crazy complex and non-standard even within itself and needs special tooling to get to where Linux is out of the box 😉 The simple answer is, the best tooling in the world will never fix the underlying complexities baked into the Windows product line and PowerShell is an attempt to make the best of a less than ideal situation. Whereas on Linux the approach has been to take a standard approach whenever possible allowing generic tools to be elegant and effective.

                                        ObsolesceO 1 Reply Last reply Reply Quote 1
                                        • scottalanmillerS
                                          scottalanmiller
                                          last edited by

                                          Objects certainly have advantages, but text has some whopping advantages, too. Like "what you see is real" rather than "what you see is a representation." It's amazing how much power not abstracting the basic configuration away from the admin provides. Yes, it can make getting specific output parsed a little harder in some cases, but means that the data provided is always parsable. Windows relies on special tools for every task, and if those tools aren't made or have issues, tough. With text interfaces, those problems don't really exist.

                                          1 Reply Last reply Reply Quote 0
                                          • ObsolesceO
                                            Obsolesce @scottalanmiller
                                            last edited by

                                            @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                                            Understood, Windows is basically crazy complex and non-standard even within itself and needs special tooling to get to where Linux is out of the box 😉 The simple answer is, the best tooling in the world will never fix the underlying complexities baked into the Windows product line and PowerShell is an attempt to make the best of a less than ideal situation. Whereas on Linux the approach has been to take a standard approach whenever possible allowing generic tools to be elegant and effective.

                                            Exactly.

                                            scottalanmillerS 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 2 / 5
                                            • First post
                                              Last post