3
rated 0 times
[
3]
[
0]
/ answers: 1 / hits: 1366
/ 2 Years ago, wed, may 18, 2022, 11:06:42
I have written a script to add chrooted sFTP users.
The useradd command is:
sudo useradd -Ng sftponly -ms /bin/false "$USER"
Did it work?
groups $USER
$USER : sftponly
Yes it did. Great!
Then I take a look at /etc/group and there is no $USER in sftponly. I try logging in and out (shouldn't need to - I am not $USER) and nothing changes. (for $USER == yoko):
ftp:x:114:
sftponly:x:1003:george,john,paul,ringo
incron:x:115:
Why am I seeing $USER in the correct group when using groups, but not in /etc/group?
More From » users