2

Recently I got the ownership of a computer which has Ubuntu 18.04.3 LTS installed and runs an ssh server on it. On the local machine, I see that the login screen has a gitlab user apart from my username in the list of users who would like to login.

After some digging, I found the following line in /etc/passwd:

gitlab:x:1007:1007:gitlab user,,,:/var/lib/gitlab:/bin/sh

I think the reason for the said behaviour is due to the uid of gitlab user being more than 1000. I would like to know how I can change that to something lower than 1000 so that gitlab user would not show up on my login screen.

Alternatively, is it safe to apt autoremove --purge gitlab*? Will it break the ssh server that is running on my system?

Thanks.

  • The ssh server on my system has no relation to gitlab in any way. – Organic Marble Jan 14 at 14:03
  • @OrganicMarble The system was handed to me as it is. I don't know why gitlab was installed by the previous user and whether I can safely uninstall it without breaking the system. Thanks. – Nanashi No Gombe Jan 14 at 14:04
  • Which functionality which was previously on this server should be kept for future use? – Yaron Jan 14 at 14:05
  • @Yaron Well, for what matters to me, I should be able to ssh into the server to compile and execute some C/C++ projects. That's all. – Nanashi No Gombe Jan 14 at 14:07
  • 1
    The simple solution is to have a fresh install of the Ubuntu OS on the machine, if you have physical access (to place USB DOK install disk in the machine), and copy the needed data to the machine (details in my answer below) – Yaron Jan 14 at 14:18
2

As it seems you've got Ubuntu server with some software/users installed on it, which you don't need to keep, and have no idea if there are any additional back doors to this machine.

The preferred solution (assuming that you have physical access to the server) is:

  • Backup every data which might be needed in the future
  • Perform fresh install of the machine (Instructions how to Install Ubuntu)
  • Copy back the to the fresh installed machine - the data you need

And you'll have a fresh Ubuntu machine, which holds only your username, without any backdoors, unknown software installed


BTW if you are only looking for a way where no one will be able to login using gitlab user:

The first thing you can do is change the shell used by gitlab to be /usr/sbin/nologin

You can do it as root:

chsh -s /usr/sbin/nologin gitlab
  • So, is this expected behaviour? Someone is supposed to login via gitlab user? I don't know what gitlab is for and if I need it anymore. – Nanashi No Gombe Jan 14 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.