1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA256 |
3 |
|
4 |
On 13/06/12 02:45 PM, Ian Stakenvicius wrote: |
5 |
> On 13/06/12 01:21 PM, Ian Stakenvicius wrote: |
6 |
>> On 13/06/12 01:19 PM, Michał Górny wrote: |
7 |
>>> On Wed, 13 Jun 2012 12:00:16 -0400 Ian Stakenvicius |
8 |
>>> <axs@g.o> wrote: |
9 |
> |
10 |
>>>> + ### force updates of some user properties + |
11 |
>>>> usermod -d "${ehome}" "${euser}" || die + |
12 |
>>>> usermod -s "${eshell}" "${euser}" || die |
13 |
> |
14 |
>>> I think usermod can handle multiple arguments. |
15 |
> |
16 |
> |
17 |
>> It can, but I figured it would be easier to debug if something |
18 |
>> failed, if each modification was on the same line. Easy to |
19 |
>> modify it to be a one-liner, however (and iirc all but possibly |
20 |
>> dscl can do this in a single call) |
21 |
> |
22 |
> |
23 |
> |
24 |
> |
25 |
> As a follow-up to this, I believe it may be possible that my |
26 |
> suggestion is incorrectly coded when considering cases where shell |
27 |
> and home are not specified. IE, the updates should be called |
28 |
> individually, and should only be called if their respective |
29 |
> variable ($ehome, $eshell) is actually set. |
30 |
> |
31 |
> I will post an update after some testing. |
32 |
|
33 |
Oh, and the code also doesn't do anything as if the user exists |
34 |
enewuser still returns before any processing is done. :) |
35 |
|
36 |
|
37 |
> |
38 |
|
39 |
-----BEGIN PGP SIGNATURE----- |
40 |
Version: GnuPG v2.0.17 (GNU/Linux) |
41 |
|
42 |
iF4EAREIAAYFAk/Y4DkACgkQ2ugaI38ACPDe2QD7B+MeuP7MYzShbmaHMBxxQzMu |
43 |
yerItXd85EU9rKCDHa8A/R3CAgN2sGJIR+LWPjmaegj5UTHToPK1OcKPMmU7JQcx |
44 |
=vb7t |
45 |
-----END PGP SIGNATURE----- |