Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dadduser
03-01-2017, 02:47 PM
Post: #21
RE: dadduser
(03-01-2017 12:00 PM)zma Wrote:  Let's make our docs clearer on this. At least stating "The group name should not be a number".

Added this description into the headpost.
Find all posts by this user
Quote this message in a reply
02-13-2018, 04:10 PM (This post was last modified: 02-13-2018 04:15 PM by rayluk.)
Post: #22
RE: dadduser
Since dexer shouldn't return zero if some process failed ( http://tab.d-thinker.org/showthread.php?...http://tab.d-thinker.org/showthread.php?...http://tab.d-thinker.org/showthread.php?tid=522 ), the following change is no longer needed.

@Xinjie,

based on http://tab.d-thinker.org/showthread.php?...http://tab.d-thinker.org/showthread.php?tid=6545&pid=6497 , dadduser will be returning non-zero value when there is some existing user on some node.

I suggest we let dadduser stop creating user on those nodes with an existing user but still sets the password for it.

Quote:dexer --ips $ips "(( -> grep ^$usr /etc/passwd && )) adduser --uid $uid $gid_opt $usr; set his password as $pass"
Find all posts by this user
Quote this message in a reply
02-13-2018, 05:58 PM
Post: #23
RE: dadduser
(02-13-2018 04:10 PM)rayluk Wrote:  Since dexer shouldn't return zero if some process failed ( http://tab.d-thinker.org/showthread.php?...http://tab.d-thinker.org/showthread.php?...http://tab.d-thinker.org/showthread.php?tid=522 ), the following change is no longer needed.

I think you mean "Since dexer returns zero if some process failed ..." and you want to revoke the proposal.
If so, it is fine.
Find all posts by this user
Quote this message in a reply
02-13-2018, 07:09 PM
Post: #24
RE: dadduser
@Xinjie, I think we don't have to modify the pseudocode of dadduser for the change in AddClusterUser,

We will have to remove the following line so dadduser would continue to work even there are existing keys. As AddCluserUser have already checked that the keys are the same, this should be safe.
Quote:if [[ -e \$home/.ssh/id_rsa ]]; then exit 21; fi;
Find all posts by this user
Quote this message in a reply
02-13-2018, 07:39 PM
Post: #25
RE: dadduser
(02-13-2018 07:09 PM)rayluk Wrote:  @Xinjie, I think we don't have to modify the pseudocode of dadduser for the change in AddClusterUser,

We will have to remove the following line so dadduser would continue to work even there are existing keys. As AddCluserUser have already checked that the keys are the same, this should be safe.
Quote:if [[ -e \$home/.ssh/id_rsa ]]; then exit 21; fi;

No. dadduser may be used without AddClusterUser. Such checking is good.
Since dexer would not return non-0 when its cmd exits 21, I guess it is just fine we do not changes anything in dadduser.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: