4
votes
2answers
55 views

Restrict user access in linux

I'm creating a new user with the following details: useradd -d /var/www/html/testuser.com -G users testuser I proceed by creating a new password for the user and attempt to login via SSH, I land on ...
3
votes
2answers
2k views

Create user who can only access one directory [duplicate]

I would like to create a user that only has access to one folder and nothing else whatsoever. I have already created a user but he has access to other parts of the system according to corresponding ...
5
votes
3answers
721 views

How can I create automatically expiring user accounts?

This is what I'd like to be able to do: After a user's account is created, they should be able to ssh-tunnel, but their account is automatically removed after 30 days unless the countdown is reset by ...
2
votes
1answer
67 views

Optimal way to setup user account / accesses?

I have a (home) Ubuntu machine; upon installation I created the "x" user during the installation (who is not the root) so often when I want to run apt-get or other things that require write access to ...
5
votes
1answer
395 views

Is it safe to use /bin/cat as shell for a restricted user?

I need to remontely log on to few peoples machines to do maintanance tasks, but sometimes the machines can be behind firewalls or NAT's. The way I have been doing it is to give the user advice on how ...
6
votes
4answers
17k views

How can I create and grant a normal user with root privileges?

I'm wondering how to create and grant a normal user (for example, named 'sybase') with root privileges? I found useradd, adduser, and passwd to be useful, but are there any other files to modify to ...
14
votes
4answers
11k views

How do I completely disable an account?

How do I completely disable an account? passwd -l will not allow anyone to log into an account using a password but you can still log in via private/public keys. How would I disable the account ...