Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User, group ID iteration is broken #13

Open
ro-ket opened this issue Jul 21, 2016 · 1 comment
Open

User, group ID iteration is broken #13

ro-ket opened this issue Jul 21, 2016 · 1 comment

Comments

@ro-ket
Copy link
Contributor

ro-ket commented Jul 21, 2016

When a user or group already exists, or the UID or GID is already in use, the script forgets the gid/uid range requested in command line argument and begins iterating from the last encountered.

Line 209:

gid=$(getGidFromGroup $group $ZONE)
Needs to be assigned to a new variable, eg matchedgid.

Line 229:

uid=$(getUidFromUser $user $ZONE)
Needs to be assigned to a new variable, eg matcheduid

Example
command: bash isilon_create_users.sh --dist hwx --startgid 2000 --startuid 12000
stdout:

ERRORS FOUND:
*  ERROR:  GID 2000 already in use by group uu in zone System
*  ERROR:  GID 2008 already in use by group vv in zone System
*  ERROR:  User hdfs already exists at uid 2013 in zone System
*  ERROR:  UID 2014 already in use by user nn in zone System
*  ERROR:  UID 2015 already in use by user nnn in zone System
*  ERROR:  UID 2016 already in use by user nnnn in zone System
*  ERROR:  UID 2017 already in use by user nnnnn in zone System
*  ERROR:  UID 2020 already in use by user aa in zone System
*  ERROR:  UID 2021 already in use by user aaa in zone System
*  ERROR:  UID 2024 already in use by user aaaa in zone System
*  ERROR:  UID 2027 already in use by user aaaaa in zone System
*  ERROR:  UID 2033 already in use by user mm in zone System
*  ERROR:  User kms already exists at uid 1009 in zone System
*  ERROR:  UID 1010 already in use by user mmm in zone System
*  ERROR:  Could not add user mapred to hadoop group in zone System
*  ERROR:  Could not add user yarn to hadoop group in zone System
*  ERROR:  Could not add user hbase to hadoop group in zone System
*  ERROR:  Could not add user storm to hadoop group in zone System
@bonibruno
Copy link

This script is only intended for new installations. If hadoop users exists, then it's not a new installation and this script should not be used.

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

No branches or pull requests

2 participants