[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Error or lacking feature of userHome() function?



Hi Bert,

I don't have any nice user in the queue right now (haha...) but have you tried using the Owner field instead of User? IIRC it is always the raw user name.

Cheers,
Max

> Am 16.11.2016 um 12:57 schrieb Bert DeKnuydt <Bert.Deknuydt@xxxxxxxxxxxxxxxx>:
> 
> 
> Hello all,
> 
> I wanted to get the home directory of users and was happy to find userHome() function:
> 
> ----
> String userHome(String userName [ , String default ])
>    Returns the home directory of the given user as configured on the current
>    system (determined using the getpwdnam() call). (Returns default if the
>    default argument is passed and the home directory of the user is not defined.)
> ----
> 
> That works as expected for 'userName' of type name@xxxxxxxxxxxxxx but barfs on
> nice-user.name@xxxxxxxxxxxxxx (which is what User returns for anyone running
> NiceUser = True).
> 
> Is that supposed to be and should I use
> 
>     userHome(regexps("(nice-user\.)?(.*)",User,"\\2")).
> 
> BTW, is there a way to get the Unix group id of a user?
> 
> Greetings, Bert.
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
> 
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/

Attachment: smime.p7s
Description: S/MIME cryptographic signature