Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #179554

Re: UID mismatch across systems

From Ross Boylan <rossboylan@stanfordalumni.org>
Newsgroups linux.debian.user
Subject Re: UID mismatch across systems
Date 2017-03-29 00:30 +0200
Message-ID <tq7MJ-5VB-1@gated-at.bofh.it> (permalink)
References <tp1gm-6A9-5@gated-at.bofh.it> <tpocV-62P-1@gated-at.bofh.it> <tpqHL-7SX-1@gated-at.bofh.it> <tpt2V-16s-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


I made some discoveries on a test system:

root@IDTest:/etc# date; usermod -u 204 Debian-exim
Tue Mar 28 15:01:19 PDT 2017
usermod: user Debian-exim is currently used by process 664

and this left everything, including the running process and passwd untouched.

So I don't have to worry about what happens when I usermod the id when
a process is running; usermod won't do that.  Of course I can still
edit the passwd file by hand, but by itself I assume this will leave
the uid of existing processes and files unchanged (except they will
display differently in ls or ps).

Also, after I stopped exim4 and executed the usermod command above,
only the passwd file changed.  So that's easy enough to do offline.

As documented, usermod changes the uids of files in the user home
directory and below, but leaves others untouched:
root@IDTest:/etc# find / -uid 104 -ls
find: `/proc/5056/task/5056/fd/5': No such file or directory
find: `/proc/5056/task/5056/fdinfo/5': No such file or directory
find: `/proc/5056/fd/5': No such file or directory
find: `/proc/5056/fdinfo/5': No such file or directory
131764    4 drwxr-s---   2 104      adm          4096 Mar 28 12:52
/var/log/exim4
131486    4 -rw-r-----   1 104      adm           756 Mar 28 14:56
/var/log/exim4/mainlog
 10943    0 drwxr-x---   2 104      Debian-exim       40 Mar 28 15:03 /run/exim4
root@IDTest:/etc# find / -uid 204 -ls
find: `/proc/5057/task/5057/fd/5': No such file or directory
find: `/proc/5057/task/5057/fdinfo/5': No such file or directory
find: `/proc/5057/fd/5': No such file or directory
find: `/proc/5057/fdinfo/5': No such file or directory
131766    4 drwxr-x---   5 Debian-exim Debian-exim     4096 Mar 28
12:50 /var/spool/exim4
131768    4 drwxr-x---   2 Debian-exim Debian-exim     4096 Mar 28
12:50 /var/spool/exim4/input
131769    4 drwxr-x---   2 Debian-exim Debian-exim     4096 Mar 28
12:50 /var/spool/exim4/msglog
131767    4 drwxr-x---   2 Debian-exim Debian-exim     4096 Mar 28
12:50 /var/spool/exim4/db

Ross

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

UID mismatch across systems "Boylan, Ross" <Ross.Boylan@ucsf.edu> - 2017-03-25 22:20 +0100
  Re: UID mismatch across systems deloptes <deloptes@gmail.com> - 2017-03-26 11:00 +0200
    Re: UID mismatch across systems Ross Boylan <rossboylan@stanfordalumni.org> - 2017-03-26 20:10 +0200
      Re: UID mismatch across systems deloptes <deloptes@gmail.com> - 2017-03-26 20:30 +0200
        Re: UID mismatch across systems Ross Boylan <rossboylan@stanfordalumni.org> - 2017-03-26 22:10 +0200
          Re: UID mismatch across systems deloptes <deloptes@gmail.com> - 2017-03-26 23:30 +0200
  Re: UID mismatch across systems Joshua Schaeffer <jschaeffer0922@gmail.com> - 2017-03-26 23:50 +0200
    Re: UID mismatch across systems Ross Boylan <rossboylan@stanfordalumni.org> - 2017-03-27 02:30 +0200
      Re: UID mismatch across systems Joshua Schaeffer <jschaeffer0922@gmail.com> - 2017-03-27 05:00 +0200
        Re: UID mismatch across systems Ross Boylan <rossboylan@stanfordalumni.org> - 2017-03-29 00:30 +0200

csiph-web