Announcement

Collapse
No announcement yet.

Migrating from Mandriva to Kubuntu - UID problems

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Migrating from Mandriva to Kubuntu - UID problems

    Most things have gone very well after changing to Kubuntu - except for the UID, (that I had set to 500 in Mdv, since that was the standard before Mdv 2009).
    This has lead to lots of problem, especially with my NAS, since Kubuntu UIDs starts at 1000.
    Is there any easy way to change this globally?

    #2
    Re: Migrating from Mandriva to Kubuntu - UID problems

    Try changing /etc/login.defs - look for the lines:
    Code:
    UID_MIN         1000
    UID_MAX         60000
    
    GID_MIN         1000
    GID_MAX         60000
    and change the 1000's to 500.

    Please Read Me

    Comment


      #3
      Re: Migrating from Mandriva to Kubuntu - UID problems

      Originally posted by oshunluvr
      and change the 1000's to 500.
      Thanks! First I will try the hard way though
      Since the problem doesn't really matter for a lot of the data, like movies, I'm copying the important stuff (like my music collection, all documents and so on) to a removable disk, and then back.
      It takes a lot of time, but if I'm right, all this data will then have UID 1000. I hope

      Comment


        #4
        Re: Migrating from Mandriva to Kubuntu - UID problems

        Now I'm confused

        Are you looking to change the ownership of the files or change the default UID?

        You can change ownership with

        sudo chown <USER>:<GROUP> <FILES>

        Please Read Me

        Comment


          #5
          Re: Migrating from Mandriva to Kubuntu - UID problems

          Originally posted by oshunluvr
          b]sudo chown <USER>:<GROUP> <FILES>[/b]
          I started out with the idea of changing default user, but gave it up since there are other users than 500, esp on the NAS.
          This causes problem with backups (rsync). The files get backed up, but I get a lot of error messages, esp with time stamps.
          And I've tried chown, but there are a lot of files where I get "Operation not permitted". Of course, I can fix this by logging in as root on the NAS, but wouldn't I then have to set all the files to [edited]nobody-nogroup? The NAS won't accept 1000 as UID, so I I can't do it that way.

          Believe me, I'm far more confused than you are - that's why I decided on the copy thing, since then I understand at least a little of what I'm doing

          Comment


            #6
            Re: Migrating from Mandriva to Kubuntu - UID problems

            We could probably help you find a better solution if we had more information.

            I'm curious as to why your NAS won't allow a UID of 1000, how it's mounted, what protocol are you using to mount it, etc.

            For example, if your using NFS to access your NAS, it's fairly easy to force UID/GID during mount. If your NAS is linux based, you can force UID and GID at the partition level, and so on.

            If you want further help or suggestions, lay out some more details.

            Please Read Me

            Comment


              #7
              Re: Migrating from Mandriva to Kubuntu - UID problems

              Originally posted by oshunluvr
              If you want further help or suggestions, lay out some more details.
              For my own sake, as well as anybode elses, I will stick to the copy track I'm very uncomfortable with the command line, since I will forget any command within 5 minutes.
              Now, I have only 250 GB copying to go; with some luck it will be done tomorrow evening.

              If you're interested academically (it might be of value later on, who knows?), this is how my setup works:
              I have a NetGear ReadyNas Duo w. two 2-TB discs that are accessed via NFS from three computers: two Kubuntu 10.10 and one Mandriva 2010.1 (that will soon be converted to Kubuntu). Mostly they access the same data (music and docs).
              Default user in the NAS is 1003 - I have tried to change this to 1000, so that I would have been able to chown all files on the NAS discs to 1000. Didn't work; "UID out of range" or something.
              The Kubuntu computers main users (there is basically only one user at each computer) are default UID 1000, the Mandriva is set to 500 (which was the Mdv standard before 2009.

              If there's something you want to know, for your own work and to help others, please feel free to ask. I have very little knowledge, but lots of time

              Comment


                #8
                Re: Migrating from Mandriva to Kubuntu - UID problems

                NFS uses a file on the server called exports, usually under /etc/. If you can get to it, you should see something like

                /mnt/shared 192.168.1.0/255.255.255.0(rw,async,secure,no_subtree_check,noh ide,anonuid=65534,anongid=560)

                (all one line)

                In my case, this maps users to "nobody" and groups to "share" for any anonymous users. There must be a way in your setup to map all users to a single UID and GID, thus efectively allowing all users to share all files.

                Please Read Me

                Comment


                  #9
                  Re: Migrating from Mandriva to Kubuntu - UID problems

                  Originally posted by oshunluvr
                  If you can get to it, you should see something like
                  /mnt/shared 192.168.1.0/255.255.255.0(rw,async,secure,no_subtree_check,noh ide,anonuid=65534,anongid=560)
                  My NAS doesn't show anything like that in "/etc/exports". Just:

                  "/addons-config" *(insecure,insecure_locks,rw,async)
                  "/backup" *(insecure,insecure_locks,rw,sync)
                  "/media" *(insecure,insecure_locks,rw,sync)

                  But on the other hand, it doesn't seem to matter, since it sets the UID on dl'd files to "nobody:nogroup" by default. So, my problem seems to stem from older files (for example, I exchanged my NAS a year ago).

                  This is what I have done so far

                  1) ran chown and chgrp on backup (since there were a lot of files present on the backup, but not on the original - this was probably related to #2)
                  2) changed charset in filenames from latin1 to utf-8, with convmv, on the backup (most names already were utf-8)
                  3) copied the backup files to NAS, creating a "new original".

                  This took a lot of time, and some nervous moments, but it was worth it - now all files are rw; likewise all filenames are readable.

                  Comment

                  Working...
                  X