rtrouton/rtrouton_scripts

Doesn't handle Domain\Username or Username@Domain properly

Tycho-S opened this issue · 2 comments

The script breaks if you enter your username in Domain\Username or Username@Domain formats :)

In our case this is necessary because we have multiple forests. It's quite probable that the machine is joined to the correct domain but not guaranteed.

The problem is that in this case it fails to create the new user correctly but it does delete the old one so it's a mess to clean up :)

Also, why not check for a functioning ID by checking whether the given username exists instead of another account? Then this wouldn't happen.

Pull requests accepted.

It was just a suggestion :) Perhaps you could add an explanation in the readme that the username must be entered without the domain.

I would submit a pull request but I started from scratch using PHP, I don't really like bash when it gets complex. I might publish it separately however I'm including a lot of automation of things like setting the machine name according to our internal standards.