I need to create read-only users and make it available for them to SSH with that user name:
groupadd -g 5000 rouser
useradd -u 5000 -g 5000 -md /home/rouser -c "StrongView Linux User" -s /bin/bash rouser
passwd rouser
Is this enough? Do I need to add more info or edit visudo file?
I also noticed that I can log in to their accounts if I have sudo access.
By default, users can only write into their home directory (which they own), any location that has 777 access (
/run/shm
,/tmp
, and a few other places), and any other location that they have user ownership. As long as the user is not in thesudo
group, the user cannot modify system directories (they can access system directories and files where theo
octet has ther
permission).I recommend that instead of creating a separate group, that you just create the user and place them into the
users
group (which I believe is by default).Also, the reason you can log into their accounts is because you have
sudo
access.