Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Changing Grouper ID

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Changing Grouper ID


Chronological Thread 
  • From: Thomas M Goerger <>
  • To: "GW Brown, Information Systems and Computing" <>
  • Cc: Tom Barton <>, "" <>
  • Subject: Re: [grouper-users] Changing Grouper ID
  • Date: Thu, 24 Apr 2008 11:27:32 -0500 (CDT)

Does the database need to be disconnected in order for this change to be
made? Or can I make this change in place while Grouper is running? If
the database needs to be disconnected, that might explain why I'm getting
an error.


On Thu, 24 Apr 2008, GW Brown, Information Systems and Computing wrote:

> You should not have to identify yourself as the root user - other than by
> starting the session as the root subject:
>
> > gsh-0.1.1 5% root=SubjectFinder.findRootSubject()
> > subject: id='GrouperSystem' type='application' source='g:isa'
> > name='GrouperSystem'
>
> This shows that GSH was able to resolve GrouperSystem. The error with:
>
> session=GrouperSession.start(root)
>
> could be due to the database configured in
> conf/grouper.hibernate.properties being unavailable. Unfortunately the
> actual error has been 'swallowed' and so is difficult to track down. I'll
> try and take a look at the source and see if tweaking log4j.properties will
> at least lead to a meaningful message in a log file somewhere.
>
> Gary
>
>
> --On 24 April 2008 10:13 -0500 Thomas M Goerger
> <>
> wrote:
>
> > Okay, that was the problem that I was running into initially. I can't
> > seem to get a root session started. I'm getting the same Method
> > Invocation error.
> >
> > gsh-0.1.1 5% root=SubjectFinder.findRootSubject()
> > subject: id='GrouperSystem' type='application' source='g:isa'
> > name='GrouperSystem'
> > gsh-0.1.1 6% session=GrouperSession.start(root)
> > // Error: unable to evaluate command: Sourced file: inline evaluation of:
> > ``session=GrouperSession.start(root);'' : Method Invocation
> > GrouperSession.start
> >
> > I'm guessing this is a permission problem also? How does one identify
> > oneself as the root user in the gsh?
> >
> >
> > On Wed, 23 Apr 2008, GW Brown, Information Systems and Computing wrote:
> >
> >> Tom,
> >>
> >> The session has to be a root session:
> >>
> >> root=SubjectFinder.findRootSubject()
> >> session=GrouperSession.start(root)
> >>
> >> subject=findSubject("<id>")
> >> member=MemberFinder.findBySubject(session,subject)
> >> member.setSubjectId("<newid>")
> >>
> >>
> >> Internally an InsufficientPrivilegeException is thrown. Unfortunately
> >> that is not reflected in the error message you got - something we'll
> >> need to work on.
> >>
> >> Gary
> >>
> >> --On 22 April 2008 12:53 -0500 Thomas M Goerger
> >> <>
> >> wrote:
> >>
> >> > I'm having a problem with the setSubjectID() command. I'm hitting my
> >> > subject a little differently than below, which may be making the
> >> > difference? I'd rather not use the uuid, so I'm hitting the subject as
> >> > follows:
> >> >
> >> > subject=findSubject("<id>")
> >> > session=GrouperSession.start(subject)
> >> > member=MemberFinder.findBySubject(session,subject)
> >> >
> >> > When I then try to run:
> >> >
> >> > member.setSubjectId("<newid>")
> >> >
> >> > I'm receiving the error:
> >> >
> >> > // Error: unable to evaluate command: Sourced file: inline evaluation
> >> > of: ``member.setSubjectId("<newid>");'' : Method Invocation
> >> > member.setSubjectId
> >> >
> >> > Seems like its not seeing the setSubjectId subcommand at all. I'm
> >> > using GrouperShell 0.1.1. Is there something off in my sequence that
> >> > might be causing the problem?
> >> >
> >> > Thanks,
> >> >
> >> > Tom Goerger
> >> >
> >> >
> >> > On Thu, 17 Apr 2008, Tom Barton wrote:
> >> >
> >> >> Or you could use Grouper Shell to make the change. Using Gary's code
> >> >> as a model, the corresponding sequence of gsh commands would be
> >> >>
> >> >> s=GrouperSession.start(SubjectFinder.findRootSubject())
> >> >> m=MemberFinder.findByUuid(s, "<uuid>")
> >> >> m.setSubjectId("newId")
> >> >>
> >> >> Tom
> >> >>
> >> >> GW Brown, Information Systems and Computing wrote:
> >> >> > No, you would need to write some code to do it. I'm sure we can
> >> >> > come up with a command line script but we're busy getting 1.3.0
> >> >> > ready just now.
> >> >> >
> >> >> > You could alter the database directly -
> >> >> >
> >> >> > update grouper_members set subject_id=:newId where subject_id=:oldId
> >> >> >
> >> >> > The code would look something like:
> >> >> >
> >> >> > GrouperSession s =
> >> >> > GrouperSession.start(SubjectFinder.findRootSubject(); Member m =
> >> >> > MemberFinder.findByUuid(s, "<uuid>") ; //look up uuid in the db
> >> >> > m.setSubjectId(newId);
> >> >> >
> >> >> > Gary
> >> >> >
> >> >> > --On 17 April 2008 11:31 -0500 Thomas M Goerger
> >> >> > <>
> >> >> > wrote:
> >> >> >
> >> >> >> Do I just add that by adding the attribute to the
> >> >> >> grouper.properties file,
> >> >> >> and setting it to true? And then rebuild the API?
> >> >> >>
> >> >> >>
> >> >> >> On Thu, 17 Apr 2008, GW Brown, Information Systems and Computing
> >> >> >> wrote:
> >> >> >>
> >> >> >>> Hi Tom,
> >> >> >>>
> >> >> >>> Grouper does membership mapping against a row in grouper_members.
> >> >> >>> You can
> >> >> >>> change the subject id there and all the group memberships /
> >> >> >>> privileges still work because they map to a group using the member
> >> >> >>> uuid.
> >> >> >>>
> >> >> >>> There is a Member.setSubjectId method which allows GrouperSystem
> >> >> >>> to do this change via the API.
> >> >> >>>
> >> >> >>> Gary
> >> >> >>>
> >> >> >>> --On 17 April 2008 09:56 -0500 Thomas M Goerger
> >> >> >>> <>
> >> >> >>> wrote:
> >> >> >>>
> >> >> >>> > Hi,
> >> >> >>> >
> >> >> >>> > I'm having an issue with changing the underlying name that
> >> >> >>> > Grouper is using to identify a user. We have an attribute
> >> >> >>> > called OfficialName that we want to use as the unique
> >> >> >>> > identifier in Grouper. Changing this value, as might happen if
> >> >> >>> > someone has a legal name change, seems to be problematic for
> >> >> >>> > Grouper. It recognizes the change if you do another search,
> >> >> >>> > but if you try to list members in a group where one of the
> >> >> >>> > names has been changed, Grouper spits back a Runtime Exception.
> >> >> >>> >
> >> >> >>> > Anyone else dealt with this at all? How do you deal with a
> >> >> >>> > changing id in your implementation?
> >> >> >>> >
> >> >> >>> > Thanks,
> >> >> >>> >
> >> >> >>> > Tom Goerger
> >> >> >>> > University of Minnesota - Internet Services
> >> >> >>> >
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>> ----------------------
> >> >> >>> GW Brown, Information Systems and Computing
> >> >> >>>
> >> >> >>>
> >> >> >
> >> >> >
> >> >> >
> >> >> > ----------------------
> >> >> > GW Brown, Information Systems and Computing
> >> >> >
> >> >>
> >>
> >>
> >>
> >> ----------------------
> >> GW Brown, Information Systems and Computing
> >>
> >>
>
>
>
> ----------------------
> GW Brown, Information Systems and Computing
>
>



Archive powered by MHonArc 2.6.16.

Top of Page