0
I have a user that was created this way:
sudo adduser --system --home=/opt/someone --group someone
This user does not have login, but when I login to server with my own user, I can change to that user using sudo su - someone -s /bin/bash
. And it is OK.
But sometimes I need to transfer files remotely to someone
user home directory, but I can't use that user because it does not have a login. The long way is to scp
files to my own home directory, then login with my own user, then change to someone
and copy those files from my home directory to someone
home directory. But that is very annoying to do it.
Maybe there is some better alternative where I could directly scp
files using someone
user?
what do you mean by This user does not have login? does
adduser
not add to the/etc/passwd
file? did you try giving the added user a random string password? – Skaperen – 2015-04-13T08:53:48.507@Skaperen "This is a “system” user. It is there to own and run the application, it isn’t supposed to be a person type user with a login etc. In Ubuntu, a system user gets a UID below 1000, has no shell (it’s actually /bin/false) and has logins disabled" at least thats what I read. – Andrius – 2015-04-13T09:34:43.930
So if you want to log in as that user, give it a password and a shell and create its home directory. – Bandrami – 2015-04-13T09:36:22.940