[Touch-packages] [Bug 1769301] Re: resetting /proc/thread-self/attr/fscreate results in 'Invalid Argument'

2019-07-29 Thread Andreas Florath
I'm sorry but I have no access to the system any longer, therefore I
cannot the command.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to libselinux in Ubuntu.
https://bugs.launchpad.net/bugs/1769301

Title:
  resetting /proc/thread-self/attr/fscreate results in 'Invalid
  Argument'

Status in libselinux package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Incomplete

Bug description:
  root@ubuntu:~# useradd -g 100 tst003
  useradd: failure while writing changes to /etc/passwd

  root@ubuntu:~# sestatus 
  SELinux status: enabled
  SELinuxfs mount:/sys/fs/selinux
  SELinux root directory: /etc/selinux
  Loaded policy name: default
  Current mode:   permissive
  Mode from config file:  permissive
  Policy MLS status:  enabled
  Policy deny_unknown status: allowed
  Memory protection checking: requested (insecure)
  Max kernel policy version:  31

  
  The problem does not occur when SELinux is complete disabled.

  Please note that a very similar problem occurs using groupadd:

  root@ubuntu:~# groupadd tstgrp001
  groupadd: failure while writing changes to /etc/group

  
  = journal = 
  (Please note that there is *no* AVC!)

  May 05 05:11:44 ubuntu useradd[756]: new user: name=tst003, UID=1004, 
GID=100, home=/home/tst003, shell=/bin/sh
  May 05 05:11:44 ubuntu audit[756]: ADD_USER pid=756 uid=0 auid=1002 ses=1 
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=adding user 
id=1004 exe="/usr/sbin/useradd" hostname=ubuntu addr=? terminal=pts/0 
res=success'
  May 05 05:11:44 ubuntu useradd[756]: failure while writing changes to 
/etc/passwd
  May 05 05:11:44 ubuntu audit[756]: ADD_USER pid=756 uid=0 auid=1002 ses=1 
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=adding user 
acct="tst003" exe="/usr/sbin/useradd" hostname=ubuntu addr=? terminal=pts/0 
res=failed'
  May 05 05:11:44 ubuntu useradd[756]: failed adding user 'tst003', data deleted

  = ltrace =

  [pid 1074] SYS_write(12, "root:x:"..., 1360) = 1360
  [pid 1074] <... fflush resumed> )= 0
  [pid 1074] fileno(0x5595b21c6200)= 12
  [pid 1074] fsync(12, 0x5595b21c62e0, 0, 0x7ff933d5c154 
  [pid 1074] SYS_fsync(12) = 0
  [pid 1074] <... fsync resumed> ) = 0
  [pid 1074] fclose(0x5595b21c6200 
  [pid 1074] SYS_close(12) = 0
  [pid 1074] <... fclose resumed> )= 0
  [pid 1074] utime(0x7ffee34207e0, 0x7ffee34206b0, 0x5595b21af010, 1 

  [pid 1074] SYS_utime("/etc/passwd-", 0x7ffee34206b0) = 0
  [pid 1074] <... utime resumed> ) = 0
  [pid 1074] fclose(0x5595b21af2a0 
  [pid 1074] SYS_close(5)  = 0
  [pid 1074] <... fclose resumed> )= 0
  [pid 1074] setfscreatecon(0, 0x5595b21af118, 1, 2 
  [pid 1074] SYS_openat(0xff9c, 0x5595b21cebc0, 0x80002, 0) = 5
  [pid 1074] SYS_write(5, nil, 0)  = -22
  [pid 1074] SYS_close(5)  = 0
  [pid 1074] <... setfscreatecon resumed> )= 0x
  [pid 1074] free(0x5595b21b9dc0)  = 
  [pid 1074] free(0x5595b21b8a00)  = 
  [pid 1074] strlen("x")   = 1
  [pid 1074] memset(0x5595b21b7560, '\0', 1)   = 0x5595b21b7560
  [pid 1074] free(0x5595b21b7560)  = 
  [pid 1074] free(0x5595b21b94e0)  = 
  [pid 1074] free(0x5595b21b9000)  = 
  [pid 1074] free(0x5595b21b8fc0)  = 

  = strace =

  write(12, "root:x:"..., 1360) = 1360
  fsync(12)   = 0
  close(12)   = 0
  utime("/etc/passwd-", {actime=1525497034 /* 2018-05-05T05:10:34+ */, 
modtime=1525496803 /* 2018-05-05T05:06:43+ */}) = 0
  close(5)= 0
  openat(AT_FDCWD, "/proc/thread-self/attr/fscreate", O_RDWR|O_CLOEXEC) = 5
  write(5, NULL, 0)   = -1 EINVAL (Invalid argument)
  close(5)= 0

  = Version Information =
  root@ubuntu:~# lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  root@ubuntu:~# dpkg -l | grep passwd | grep -v base-pa
  ii  passwd1:4.5-1ubuntu1
amd64change and administer password and group data

  root@ubuntu:~# dpkg -l | grep selinux
  ii  libselinux1:amd64 2.7-2build2   
amd64SELinux runtime shared libraries
  ii  python3-selinux   2.7-2build2   
amd64Python3 bindings to SELinux shared libraries
  ii  selinux-basics0.5.6 
all  SELinux basic support
  ii  selinux-policy-default2:2.20180114-1
all 

[Touch-packages] [Bug 1769301] Re: resetting /proc/thread-self/attr/fscreate results in 'Invalid Argument'

2019-07-29 Thread Laurent Bigonville
** Also affects: linux (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to libselinux in Ubuntu.
https://bugs.launchpad.net/bugs/1769301

Title:
  resetting /proc/thread-self/attr/fscreate results in 'Invalid
  Argument'

Status in libselinux package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  New

Bug description:
  root@ubuntu:~# useradd -g 100 tst003
  useradd: failure while writing changes to /etc/passwd

  root@ubuntu:~# sestatus 
  SELinux status: enabled
  SELinuxfs mount:/sys/fs/selinux
  SELinux root directory: /etc/selinux
  Loaded policy name: default
  Current mode:   permissive
  Mode from config file:  permissive
  Policy MLS status:  enabled
  Policy deny_unknown status: allowed
  Memory protection checking: requested (insecure)
  Max kernel policy version:  31

  
  The problem does not occur when SELinux is complete disabled.

  Please note that a very similar problem occurs using groupadd:

  root@ubuntu:~# groupadd tstgrp001
  groupadd: failure while writing changes to /etc/group

  
  = journal = 
  (Please note that there is *no* AVC!)

  May 05 05:11:44 ubuntu useradd[756]: new user: name=tst003, UID=1004, 
GID=100, home=/home/tst003, shell=/bin/sh
  May 05 05:11:44 ubuntu audit[756]: ADD_USER pid=756 uid=0 auid=1002 ses=1 
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=adding user 
id=1004 exe="/usr/sbin/useradd" hostname=ubuntu addr=? terminal=pts/0 
res=success'
  May 05 05:11:44 ubuntu useradd[756]: failure while writing changes to 
/etc/passwd
  May 05 05:11:44 ubuntu audit[756]: ADD_USER pid=756 uid=0 auid=1002 ses=1 
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=adding user 
acct="tst003" exe="/usr/sbin/useradd" hostname=ubuntu addr=? terminal=pts/0 
res=failed'
  May 05 05:11:44 ubuntu useradd[756]: failed adding user 'tst003', data deleted

  = ltrace =

  [pid 1074] SYS_write(12, "root:x:"..., 1360) = 1360
  [pid 1074] <... fflush resumed> )= 0
  [pid 1074] fileno(0x5595b21c6200)= 12
  [pid 1074] fsync(12, 0x5595b21c62e0, 0, 0x7ff933d5c154 
  [pid 1074] SYS_fsync(12) = 0
  [pid 1074] <... fsync resumed> ) = 0
  [pid 1074] fclose(0x5595b21c6200 
  [pid 1074] SYS_close(12) = 0
  [pid 1074] <... fclose resumed> )= 0
  [pid 1074] utime(0x7ffee34207e0, 0x7ffee34206b0, 0x5595b21af010, 1 

  [pid 1074] SYS_utime("/etc/passwd-", 0x7ffee34206b0) = 0
  [pid 1074] <... utime resumed> ) = 0
  [pid 1074] fclose(0x5595b21af2a0 
  [pid 1074] SYS_close(5)  = 0
  [pid 1074] <... fclose resumed> )= 0
  [pid 1074] setfscreatecon(0, 0x5595b21af118, 1, 2 
  [pid 1074] SYS_openat(0xff9c, 0x5595b21cebc0, 0x80002, 0) = 5
  [pid 1074] SYS_write(5, nil, 0)  = -22
  [pid 1074] SYS_close(5)  = 0
  [pid 1074] <... setfscreatecon resumed> )= 0x
  [pid 1074] free(0x5595b21b9dc0)  = 
  [pid 1074] free(0x5595b21b8a00)  = 
  [pid 1074] strlen("x")   = 1
  [pid 1074] memset(0x5595b21b7560, '\0', 1)   = 0x5595b21b7560
  [pid 1074] free(0x5595b21b7560)  = 
  [pid 1074] free(0x5595b21b94e0)  = 
  [pid 1074] free(0x5595b21b9000)  = 
  [pid 1074] free(0x5595b21b8fc0)  = 

  = strace =

  write(12, "root:x:"..., 1360) = 1360
  fsync(12)   = 0
  close(12)   = 0
  utime("/etc/passwd-", {actime=1525497034 /* 2018-05-05T05:10:34+ */, 
modtime=1525496803 /* 2018-05-05T05:06:43+ */}) = 0
  close(5)= 0
  openat(AT_FDCWD, "/proc/thread-self/attr/fscreate", O_RDWR|O_CLOEXEC) = 5
  write(5, NULL, 0)   = -1 EINVAL (Invalid argument)
  close(5)= 0

  = Version Information =
  root@ubuntu:~# lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  root@ubuntu:~# dpkg -l | grep passwd | grep -v base-pa
  ii  passwd1:4.5-1ubuntu1
amd64change and administer password and group data

  root@ubuntu:~# dpkg -l | grep selinux
  ii  libselinux1:amd64 2.7-2build2   
amd64SELinux runtime shared libraries
  ii  python3-selinux   2.7-2build2   
amd64Python3 bindings to SELinux shared libraries
  ii  selinux-basics0.5.6 
all  SELinux basic support
  ii  selinux-policy-default2:2.20180114-1
all  Strict and 

[Touch-packages] [Bug 1769301] Re: resetting /proc/thread-self/attr/fscreate results in 'Invalid Argument'

2018-08-24 Thread Igor Klyuchnikov
I've asked a question on stackexchange.com, but still no answer. There is a 
detailed description and some logs.
https://unix.stackexchange.com/questions/458853/useradd-groupadd-fails-failure-while-writing-changes-to-etc-passwd-and-etc-gr

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to libselinux in Ubuntu.
https://bugs.launchpad.net/bugs/1769301

Title:
  resetting /proc/thread-self/attr/fscreate results in 'Invalid
  Argument'

Status in libselinux package in Ubuntu:
  Confirmed

Bug description:
  root@ubuntu:~# useradd -g 100 tst003
  useradd: failure while writing changes to /etc/passwd

  root@ubuntu:~# sestatus 
  SELinux status: enabled
  SELinuxfs mount:/sys/fs/selinux
  SELinux root directory: /etc/selinux
  Loaded policy name: default
  Current mode:   permissive
  Mode from config file:  permissive
  Policy MLS status:  enabled
  Policy deny_unknown status: allowed
  Memory protection checking: requested (insecure)
  Max kernel policy version:  31

  
  The problem does not occur when SELinux is complete disabled.

  Please note that a very similar problem occurs using groupadd:

  root@ubuntu:~# groupadd tstgrp001
  groupadd: failure while writing changes to /etc/group

  
  = journal = 
  (Please note that there is *no* AVC!)

  May 05 05:11:44 ubuntu useradd[756]: new user: name=tst003, UID=1004, 
GID=100, home=/home/tst003, shell=/bin/sh
  May 05 05:11:44 ubuntu audit[756]: ADD_USER pid=756 uid=0 auid=1002 ses=1 
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=adding user 
id=1004 exe="/usr/sbin/useradd" hostname=ubuntu addr=? terminal=pts/0 
res=success'
  May 05 05:11:44 ubuntu useradd[756]: failure while writing changes to 
/etc/passwd
  May 05 05:11:44 ubuntu audit[756]: ADD_USER pid=756 uid=0 auid=1002 ses=1 
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=adding user 
acct="tst003" exe="/usr/sbin/useradd" hostname=ubuntu addr=? terminal=pts/0 
res=failed'
  May 05 05:11:44 ubuntu useradd[756]: failed adding user 'tst003', data deleted

  = ltrace =

  [pid 1074] SYS_write(12, "root:x:"..., 1360) = 1360
  [pid 1074] <... fflush resumed> )= 0
  [pid 1074] fileno(0x5595b21c6200)= 12
  [pid 1074] fsync(12, 0x5595b21c62e0, 0, 0x7ff933d5c154 
  [pid 1074] SYS_fsync(12) = 0
  [pid 1074] <... fsync resumed> ) = 0
  [pid 1074] fclose(0x5595b21c6200 
  [pid 1074] SYS_close(12) = 0
  [pid 1074] <... fclose resumed> )= 0
  [pid 1074] utime(0x7ffee34207e0, 0x7ffee34206b0, 0x5595b21af010, 1 

  [pid 1074] SYS_utime("/etc/passwd-", 0x7ffee34206b0) = 0
  [pid 1074] <... utime resumed> ) = 0
  [pid 1074] fclose(0x5595b21af2a0 
  [pid 1074] SYS_close(5)  = 0
  [pid 1074] <... fclose resumed> )= 0
  [pid 1074] setfscreatecon(0, 0x5595b21af118, 1, 2 
  [pid 1074] SYS_openat(0xff9c, 0x5595b21cebc0, 0x80002, 0) = 5
  [pid 1074] SYS_write(5, nil, 0)  = -22
  [pid 1074] SYS_close(5)  = 0
  [pid 1074] <... setfscreatecon resumed> )= 0x
  [pid 1074] free(0x5595b21b9dc0)  = 
  [pid 1074] free(0x5595b21b8a00)  = 
  [pid 1074] strlen("x")   = 1
  [pid 1074] memset(0x5595b21b7560, '\0', 1)   = 0x5595b21b7560
  [pid 1074] free(0x5595b21b7560)  = 
  [pid 1074] free(0x5595b21b94e0)  = 
  [pid 1074] free(0x5595b21b9000)  = 
  [pid 1074] free(0x5595b21b8fc0)  = 

  = strace =

  write(12, "root:x:"..., 1360) = 1360
  fsync(12)   = 0
  close(12)   = 0
  utime("/etc/passwd-", {actime=1525497034 /* 2018-05-05T05:10:34+ */, 
modtime=1525496803 /* 2018-05-05T05:06:43+ */}) = 0
  close(5)= 0
  openat(AT_FDCWD, "/proc/thread-self/attr/fscreate", O_RDWR|O_CLOEXEC) = 5
  write(5, NULL, 0)   = -1 EINVAL (Invalid argument)
  close(5)= 0

  = Version Information =
  root@ubuntu:~# lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  root@ubuntu:~# dpkg -l | grep passwd | grep -v base-pa
  ii  passwd1:4.5-1ubuntu1
amd64change and administer password and group data

  root@ubuntu:~# dpkg -l | grep selinux
  ii  libselinux1:amd64 2.7-2build2   
amd64SELinux runtime shared libraries
  ii  python3-selinux   2.7-2build2   
amd64Python3 bindings to SELinux shared libraries
  ii  selinux-basics0.5.6 
all  SEL

[Touch-packages] [Bug 1769301] Re: resetting /proc/thread-self/attr/fscreate results in 'Invalid Argument'

2018-08-23 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: libselinux (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to libselinux in Ubuntu.
https://bugs.launchpad.net/bugs/1769301

Title:
  resetting /proc/thread-self/attr/fscreate results in 'Invalid
  Argument'

Status in libselinux package in Ubuntu:
  Confirmed

Bug description:
  root@ubuntu:~# useradd -g 100 tst003
  useradd: failure while writing changes to /etc/passwd

  root@ubuntu:~# sestatus 
  SELinux status: enabled
  SELinuxfs mount:/sys/fs/selinux
  SELinux root directory: /etc/selinux
  Loaded policy name: default
  Current mode:   permissive
  Mode from config file:  permissive
  Policy MLS status:  enabled
  Policy deny_unknown status: allowed
  Memory protection checking: requested (insecure)
  Max kernel policy version:  31

  
  The problem does not occur when SELinux is complete disabled.

  Please note that a very similar problem occurs using groupadd:

  root@ubuntu:~# groupadd tstgrp001
  groupadd: failure while writing changes to /etc/group

  
  = journal = 
  (Please note that there is *no* AVC!)

  May 05 05:11:44 ubuntu useradd[756]: new user: name=tst003, UID=1004, 
GID=100, home=/home/tst003, shell=/bin/sh
  May 05 05:11:44 ubuntu audit[756]: ADD_USER pid=756 uid=0 auid=1002 ses=1 
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=adding user 
id=1004 exe="/usr/sbin/useradd" hostname=ubuntu addr=? terminal=pts/0 
res=success'
  May 05 05:11:44 ubuntu useradd[756]: failure while writing changes to 
/etc/passwd
  May 05 05:11:44 ubuntu audit[756]: ADD_USER pid=756 uid=0 auid=1002 ses=1 
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=adding user 
acct="tst003" exe="/usr/sbin/useradd" hostname=ubuntu addr=? terminal=pts/0 
res=failed'
  May 05 05:11:44 ubuntu useradd[756]: failed adding user 'tst003', data deleted

  = ltrace =

  [pid 1074] SYS_write(12, "root:x:"..., 1360) = 1360
  [pid 1074] <... fflush resumed> )= 0
  [pid 1074] fileno(0x5595b21c6200)= 12
  [pid 1074] fsync(12, 0x5595b21c62e0, 0, 0x7ff933d5c154 
  [pid 1074] SYS_fsync(12) = 0
  [pid 1074] <... fsync resumed> ) = 0
  [pid 1074] fclose(0x5595b21c6200 
  [pid 1074] SYS_close(12) = 0
  [pid 1074] <... fclose resumed> )= 0
  [pid 1074] utime(0x7ffee34207e0, 0x7ffee34206b0, 0x5595b21af010, 1 

  [pid 1074] SYS_utime("/etc/passwd-", 0x7ffee34206b0) = 0
  [pid 1074] <... utime resumed> ) = 0
  [pid 1074] fclose(0x5595b21af2a0 
  [pid 1074] SYS_close(5)  = 0
  [pid 1074] <... fclose resumed> )= 0
  [pid 1074] setfscreatecon(0, 0x5595b21af118, 1, 2 
  [pid 1074] SYS_openat(0xff9c, 0x5595b21cebc0, 0x80002, 0) = 5
  [pid 1074] SYS_write(5, nil, 0)  = -22
  [pid 1074] SYS_close(5)  = 0
  [pid 1074] <... setfscreatecon resumed> )= 0x
  [pid 1074] free(0x5595b21b9dc0)  = 
  [pid 1074] free(0x5595b21b8a00)  = 
  [pid 1074] strlen("x")   = 1
  [pid 1074] memset(0x5595b21b7560, '\0', 1)   = 0x5595b21b7560
  [pid 1074] free(0x5595b21b7560)  = 
  [pid 1074] free(0x5595b21b94e0)  = 
  [pid 1074] free(0x5595b21b9000)  = 
  [pid 1074] free(0x5595b21b8fc0)  = 

  = strace =

  write(12, "root:x:"..., 1360) = 1360
  fsync(12)   = 0
  close(12)   = 0
  utime("/etc/passwd-", {actime=1525497034 /* 2018-05-05T05:10:34+ */, 
modtime=1525496803 /* 2018-05-05T05:06:43+ */}) = 0
  close(5)= 0
  openat(AT_FDCWD, "/proc/thread-self/attr/fscreate", O_RDWR|O_CLOEXEC) = 5
  write(5, NULL, 0)   = -1 EINVAL (Invalid argument)
  close(5)= 0

  = Version Information =
  root@ubuntu:~# lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  root@ubuntu:~# dpkg -l | grep passwd | grep -v base-pa
  ii  passwd1:4.5-1ubuntu1
amd64change and administer password and group data

  root@ubuntu:~# dpkg -l | grep selinux
  ii  libselinux1:amd64 2.7-2build2   
amd64SELinux runtime shared libraries
  ii  python3-selinux   2.7-2build2   
amd64Python3 bindings to SELinux shared libraries
  ii  selinux-basics0.5.6 
all  SELinux basic support
  ii  selinux-policy-default2:2.20180114-1
all

[Touch-packages] [Bug 1769301] Re: resetting /proc/thread-self/attr/fscreate results in 'Invalid Argument'

2018-08-23 Thread Igor Klyuchnikov
Got the same problem. It looks like the problem is in the kernel 4.15
with Canonical patches. Vanilla 4.15, built from source, has no problem
with useradd. Ubuntu 16.04 LTS kernel 4.13 generic, built from source,
is also  ok. I've spent plenty of time trying to make it work.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to libselinux in Ubuntu.
https://bugs.launchpad.net/bugs/1769301

Title:
  resetting /proc/thread-self/attr/fscreate results in 'Invalid
  Argument'

Status in libselinux package in Ubuntu:
  New

Bug description:
  root@ubuntu:~# useradd -g 100 tst003
  useradd: failure while writing changes to /etc/passwd

  root@ubuntu:~# sestatus 
  SELinux status: enabled
  SELinuxfs mount:/sys/fs/selinux
  SELinux root directory: /etc/selinux
  Loaded policy name: default
  Current mode:   permissive
  Mode from config file:  permissive
  Policy MLS status:  enabled
  Policy deny_unknown status: allowed
  Memory protection checking: requested (insecure)
  Max kernel policy version:  31

  
  The problem does not occur when SELinux is complete disabled.

  Please note that a very similar problem occurs using groupadd:

  root@ubuntu:~# groupadd tstgrp001
  groupadd: failure while writing changes to /etc/group

  
  = journal = 
  (Please note that there is *no* AVC!)

  May 05 05:11:44 ubuntu useradd[756]: new user: name=tst003, UID=1004, 
GID=100, home=/home/tst003, shell=/bin/sh
  May 05 05:11:44 ubuntu audit[756]: ADD_USER pid=756 uid=0 auid=1002 ses=1 
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=adding user 
id=1004 exe="/usr/sbin/useradd" hostname=ubuntu addr=? terminal=pts/0 
res=success'
  May 05 05:11:44 ubuntu useradd[756]: failure while writing changes to 
/etc/passwd
  May 05 05:11:44 ubuntu audit[756]: ADD_USER pid=756 uid=0 auid=1002 ses=1 
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=adding user 
acct="tst003" exe="/usr/sbin/useradd" hostname=ubuntu addr=? terminal=pts/0 
res=failed'
  May 05 05:11:44 ubuntu useradd[756]: failed adding user 'tst003', data deleted

  = ltrace =

  [pid 1074] SYS_write(12, "root:x:"..., 1360) = 1360
  [pid 1074] <... fflush resumed> )= 0
  [pid 1074] fileno(0x5595b21c6200)= 12
  [pid 1074] fsync(12, 0x5595b21c62e0, 0, 0x7ff933d5c154 
  [pid 1074] SYS_fsync(12) = 0
  [pid 1074] <... fsync resumed> ) = 0
  [pid 1074] fclose(0x5595b21c6200 
  [pid 1074] SYS_close(12) = 0
  [pid 1074] <... fclose resumed> )= 0
  [pid 1074] utime(0x7ffee34207e0, 0x7ffee34206b0, 0x5595b21af010, 1 

  [pid 1074] SYS_utime("/etc/passwd-", 0x7ffee34206b0) = 0
  [pid 1074] <... utime resumed> ) = 0
  [pid 1074] fclose(0x5595b21af2a0 
  [pid 1074] SYS_close(5)  = 0
  [pid 1074] <... fclose resumed> )= 0
  [pid 1074] setfscreatecon(0, 0x5595b21af118, 1, 2 
  [pid 1074] SYS_openat(0xff9c, 0x5595b21cebc0, 0x80002, 0) = 5
  [pid 1074] SYS_write(5, nil, 0)  = -22
  [pid 1074] SYS_close(5)  = 0
  [pid 1074] <... setfscreatecon resumed> )= 0x
  [pid 1074] free(0x5595b21b9dc0)  = 
  [pid 1074] free(0x5595b21b8a00)  = 
  [pid 1074] strlen("x")   = 1
  [pid 1074] memset(0x5595b21b7560, '\0', 1)   = 0x5595b21b7560
  [pid 1074] free(0x5595b21b7560)  = 
  [pid 1074] free(0x5595b21b94e0)  = 
  [pid 1074] free(0x5595b21b9000)  = 
  [pid 1074] free(0x5595b21b8fc0)  = 

  = strace =

  write(12, "root:x:"..., 1360) = 1360
  fsync(12)   = 0
  close(12)   = 0
  utime("/etc/passwd-", {actime=1525497034 /* 2018-05-05T05:10:34+ */, 
modtime=1525496803 /* 2018-05-05T05:06:43+ */}) = 0
  close(5)= 0
  openat(AT_FDCWD, "/proc/thread-self/attr/fscreate", O_RDWR|O_CLOEXEC) = 5
  write(5, NULL, 0)   = -1 EINVAL (Invalid argument)
  close(5)= 0

  = Version Information =
  root@ubuntu:~# lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  root@ubuntu:~# dpkg -l | grep passwd | grep -v base-pa
  ii  passwd1:4.5-1ubuntu1
amd64change and administer password and group data

  root@ubuntu:~# dpkg -l | grep selinux
  ii  libselinux1:amd64 2.7-2build2   
amd64SELinux runtime shared libraries
  ii  python3-selinux   2.7-2build2   
amd64Python3 bindings to SELinux shared libraries
  ii  selinux-basics0.5.6