[OpenAFS] Re: [Slightly OT] changing UID of a user to 1
Madhusudan Singh
singh.madhusudan@gmail.com
Mon, 29 Aug 2005 14:26:40 -0400
On Sunday 28 August 2005 3:39 pm, Russ Allbery wrote:
> Madhusudan Singh <singh.madhusudan@gmail.com> writes:
> >> That m_singh is a member of system:administrators makes no difference
> >> to how you would change the AFS UID. The answer is, you can't (at
> >> least so far as I know; I welcome correction from anyone else). You
> >> have to create a new user with a different name and the new UID, add it
> >> to the AFS groups that the old user was in, delete the old user, and
> >> then pts rename the new user to the old user. I think it actually may
> >> be somewhat difficult for you to do this, because in order to do it you
> >> need to be able to authenticate as a different user who's also in
> >> system:administrators or you'll lose access when you pts delete the old
> >> user and then won't be able to finish the renaming of the new user to
> >> something that matches the Kerberos principal. This may be a bit
> >> tricky when you don't control the KDC and can't create a new principal.
> >
> > Well, that seems to leave only one option. Change the Unix ID of the
> > user in question to 1. How do I :
> >
> > Change the UID of the user "daemon" to something else (say 11), change
> > all the ownerships on all the files owned by it on the system
> > consistently and make sure that no processes crash.
>
> I wouldn't really recommend this. The system probably isn't going to like
> it, and then you'd have to maintain it forever. I'd recommend instead to
> ask your local Kerberos administrator to temporarily create you a second
> identity that you can add to system:administrators and use to do the delet
> and recreate of your regular principal.
>
> This is another good reason to use a separate admin principal from your
> regular principal, one that I'd not thought about before.
Ok. I tried the following :
Created a second user (bnl4) and added it to system:administrators. Then
deleted the old user (m_singh) from the system using:
pts delete $1
vos remove -id user.$1.backup
fs rmmount /afs/omega.domain.edu/user/$1/OldFiles
vos remove -id user.$1
fs rmmount /afs/omega.domain.edu/user/$1
Now if I try to add it, I get the error message :
'/afs/omega.domain.edu/user/m_singh/OldFiles' is a mount point for volume
'#user.m_singh.backup'
There is no such volume (after deleting the user again).
omega:/afs/omega.domain.edu/user# vos listvol -server omega
Total number of volumes on server omega partition /vicepa: 16
root.afs 536870912 RW 169 K On-line
root.afs.readonly 536870913 RO 169 K On-line
root.cell 536870915 RW 4 K On-line
root.cell.readonly 536870916 RO 4 K On-line
service 536870921 RW 2 K On-line
user 536870918 RW 8 K On-line
user.bnl4 536870939 RW 6 K On-line
user.bnl4.backup 536870941 BK 2 K On-line
user.heidel 536870927 RW 6 K On-line
user.heidel.backup 536870929 BK 6 K On-line
user.kemal 536870933 RW 18038486 K On-line
user.kemal.backup 536870935 BK 18038486 K On-line
user.krivoire 536870930 RW 6 K On-line
user.krivoire.backup 536870932 BK 6 K On-line
user.msegal 536870936 RW 4684846 K On-line
user.msegal.backup 536870938 BK 4684846 K On-line
Total volumes onLine 16 ; Total volumes offLine 0 ; Total busy 0
Total number of volumes on server omega partition /vicepb: 0
Total volumes onLine 0 ; Total volumes offLine 0 ; Total busy 0
What is this ghost volume, and how do I get rid of it ?
omega:/afs/omega.domain.edu/user# vos remove -id #user.m_singh.backup
vos: The field '-id' isn't completed properly
omega:/afs/omega.domain.edu/user# vos remove -id '#user.m_singh.backup'
Can't find volume name '#user.m_singh.backup' in VLDB
VLDB: volume name is illegal
Thanks.