how to create a user with userid 1000

Forum Forums New users New Users and General Questions how to create a user with userid 1000

  • This topic has 1 reply, 2 voices, and was last updated Oct 7-9:41 pm by Brian Masinick.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #42659
    Member
    pipfranto

      i am trying to create a user called “demo” with (userid 1000)

      i have tried:

      sudo useradd username
      sudo su
      su – demo

      but i get this warning:
      su: warning: cannot change directory to /home/demo: No such file or directory

      i am trying to run these command as a user with userid 1000:
      $ /sbin/modprobe ashmem_linux
      $ /sbin/modprobe binder_linux
      $ /usr/share/anbox/anbox-bridge.sh start
      $ su -m
      $ env | grep XDG_RUNTIME_DIR

      #42670
      Moderator
      Brian Masinick
        Helpful
        Up
        0
        ::

        i am trying to create a user called “demo” with (userid 1000)

        i have tried:

        sudo useradd username
        sudo su
        su – demo

        but i get this warning:
        su: warning: cannot change directory to /home/demo: No such file or directory

        i am trying to run these command as a user with userid 1000:
        $ /sbin/modprobe ashmem_linux
        $ /sbin/modprobe binder_linux
        $ /usr/share/anbox/anbox-bridge.sh start
        $ su -m
        $ env | grep XDG_RUNTIME_DIR

        Is there ANOTHER user already in the /etc/passwd file with the UID = 1000?
        If so, the best you can do is to have two names with the same UID, but there will likely be undesirable side effects; for one, you cannot use either useradd or adduser to accomplish adding multiple IDs with the same UID; you can only do it by manually editing /etc/passwd.

        I believe that I HAVE done it in the past, but again, I was prepared to live with the behavior or modify files myself, with or without any actual or implied support or expected behavior. My guess is that UID 1000 is already in use by the username you chose when you installed antiX. On the live image, I do believe that demo has UID 1000; to get yours to do it, give up the other name and change /etc/passwd, /etc/group, and the filesystem to match the name demo rather than the previous name; you’ll probably need to run as root to accomplish this without failure, but it can be done if you know what you are doing.

        --
        Brian Masinick

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.