Patch 1#1
Merged
geekcomputers merged 4 commits intomastergeekcomputers/Shell:masterfrom Sep 30, 2017
unknown repositoryCopy head branch name to clipboard
Merged
Patch 1#1geekcomputers merged 4 commits intomastergeekcomputers/Shell:masterfrom unknown repositoryCopy head branch name to clipboard
geekcomputers merged 4 commits intomastergeekcomputers/Shell:masterfrom
unknown repositoryCopy head branch name to clipboard
Conversation
Owner
|
Thank you for you contribution to the repo and the community
… On 13 Sep 2017, at 17:46, Terminal for Life ***@***.***> wrote:
Used OSTYPE (since bash) instead of uname to save opening another process.
Avoided awk with standard shell logic, saving another process.
It should now be a little bit simpler to add new OS types to the if statement; just call the function and use upper- or lower-case 'S'. You can use other position parameters in the function for other differences in other OS types.
Root access on different setups may be needed for the -a flag with the passwd command. Using passwd package 1:4.2-3.1ubuntu5.3 on an Ubuntu 16.04.3 setup, I needed root access for the -a flag.
Made the message for users without passwords a more traditional, tidier ERROR message. It might be nice and handy to have a loop iterate over each username to supply both the name and the UID, perhaps other information too.
If you wind up keeping the line which had awk in it, I recommend instead using cut -d " " -f 1 as it's more portable (part of coreutils).
You can view, comment on, or merge this pull request online at:
#1 <#1>
Commit Summary
Update users_no_password.sh
Update users_no_password.sh
Update users_no_password.sh
Update users_no_password.sh
File Changes
M users_no_password.sh <https://github.com/geekcomputers/Shell/pull/1/files#diff-0> (32)
Patch Links:
https://github.com/geekcomputers/Shell/pull/1.patch <https://github.com/geekcomputers/Shell/pull/1.patch>
https://github.com/geekcomputers/Shell/pull/1.diff <https://github.com/geekcomputers/Shell/pull/1.diff>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#1>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABHa0sDXUJP7c2NWTEDrgdVoXy_kjzDfks5siAbSgaJpZM4PWZ78>.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Used OSTYPE (since bash) instead of uname to save opening another process.
Avoided awk with standard shell logic, saving another process.
It should now be a little bit simpler to add new OS types to the if statement; just call the function and use upper- or lower-case 'S'. You can use other position parameters in the function for other differences in other OS types.
Root access on different setups may be needed for the -a flag with the passwd command. Using passwd package 1:4.2-3.1ubuntu5.3 on an Ubuntu 16.04.3 setup, I needed root access for the -a flag.
Made the message for users without passwords a more traditional, tidier ERROR message. It might be nice and handy to have a loop iterate over each username to supply both the name and the UID, perhaps other information too.
If you wind up keeping the line which had awk in it, I recommend instead using cut -d " " -f 1 as it's more portable (part of coreutils).