Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [account-restrictions]

The tag has no usage guidance.

0
votes
0answers
26 views

Using ssh keys with a user account's shell set to /sbin/nologin

I have users that log in directly to a user account (Oracle) when they know should log in with their account and then su to the Oracle account. I've set that account's shell to /sbin/nologin as I'm ...
0
votes
1answer
20 views

restrictions on a directory on shared server

I have 1 directory on a Unix server which is accessible to all currently as users logged in user name is common but they logged in to that user via sudo su -iu. I want only 10 users to have access on ...
0
votes
1answer
76 views

MAXWEEKS on Solaris is equals to 13

I have a server where MAXWEEKS is set to 13 in etc/default/passwd. I know that this setting means that password will expire after 13 weeks. My question is if the user does NOT change the password, ...
1
vote
3answers
48 views

How to make a restricted user which can only start a shellscript?

How can I create a local user, which can log in via SSH to linux machines, ex.: SLES12 and can only execute a shellscript, which comes up after SSH login? So it shouldn't be able to trick that it ...
0
votes
0answers
20 views

Allow only rdesktop client on Raspberry Pi

I have an internet connected windows PC thats part of a domain with full controls and restrictions. I have been asked to provide internet connection to another room. There are quite a few ...
3
votes
1answer
4k views

how to restrict users not to login to root by using sudo -i and sudo su - and other if exists [duplicate]

I have tried to restrict user by editing sudoers file M ALL=!/bin/su. I am able to restrict sudo su - but not sudo -i.
1
vote
0answers
29 views

Disallow user from entering, listing specific folders

I have a question about, how can I restrict a standard user from entering the /etc folder? My goal is to have a user with bash, who can enter the /var/www/html folder and its own home folder but ...
1
vote
0answers
31 views

Password protect a program without system accounts

we have a Linux system with a program to control a machine. We want to restrict and log access to this program with some kind of user/password combination, but I don't want to create a new user ...
3
votes
1answer
129 views

How to access only world readable files in SElinux sandbox

I want to run programs made as student assignments in an SELinux sandbox (to check output and behaviour as a first part of grading the assignments without having to check very closely if some students ...
0
votes
1answer
97 views

Restrict the access of an account in linux?

I've created a service account in my Redhat machine. The purpose of the account is to execute the bash script which I had created. The bash script basically checks the system properties like cpuinfo,...
6
votes
1answer
132 views

How to run script as restricted user?

I need to create a very restricted user on Linux that will have restrictive list of commands to run, be able to see some log files and and to run the script from /opt/bin folder. I cannot use Jailkit ...
0
votes
1answer
41 views

restrict a user's directories

I have some running project with logging directories. I wish to create a user that has only read access to those directories so that he will be used by a third party to investigate deployment problems....
0
votes
3answers
917 views

Prevent SSH user from executing any command line

I want to know if there is any way to prevent user from executing any command line (even some simple one like ls -la, uptime...) I tried some ways like delete user's bash file but it didn't work. All ...
1
vote
1answer
206 views

Access Linux with Non interactive account

Not sure if the question makes sense. But, here it goes. We are developing a Web application (.NET) that basically checks status of some Linux servers and services running inside them. We are ...
0
votes
1answer
51 views

Openssh home dir mods

Our recently deceased guru compiled a version of openssh for Scientific Linux in 2012 that allows us to "lock" users into their home directories in a really cool way. For example, we make their home ...
1
vote
1answer
54 views

SSH and SCP piggyback ubuntu machine for a new user

I want to use an existing Ubuntu machine (with a public IP) to allow a user to SSH into it and then use it to SSH/RemoteDesktop/FTP into another linux machine (with a private IP but within the 1st ...
0
votes
1answer
97 views

Running code when /bin/sh has no rights

I've obtained a shell on an embeded device, a /bin/sh shell, but it is extremely limited; It just allows me to run a few commands with specific arguments, like ifconfig, or iptables, or cat (but not ...
0
votes
1answer
604 views

Allow to run a python script but not allow to read its content

I want to demonstrate a client how my python script works on my server to which I'll give him access. Also, I don't want him to be able to see the code of the python script, only run it. Is it ...
-1
votes
1answer
78 views

What is the device process name if Unix server restsrt

On Microsoft Windows NT, at system startup the event number 4608 is generated by Microsoft-Windows-Security-Auditing and I can see that in the security event log. You can read more about it in this ...
0
votes
2answers
650 views

How to limit users permissions to only use mysql

Is it possible to create users (non-sudoers) that can only use the command "mysql" ? or set of commands ? Context: I have a server hosting a mysql database. I want to give some users the rights to ...
3
votes
1answer
124 views

Force login through ssh only

I have a small problem. I have two accounts on a PC. One is used for "normal" operations, usually through the graphical interface, the other is only used for remote management (upload files through ...
4
votes
0answers
657 views

git push/pull with ssh key

I have a 'git --bare' repo on a linux machine. I wish to allow another user from a different machine to push/pull to it. I have their ssh key. Is there some way I can allow them to execute the ...
0
votes
0answers
221 views

Workaround for running privileged commands from www-data user

I would like to append a string to a file located in /tmp/ from a php script. The command I would like to execute is: sudo sed -e 's/$/,yes/' -i /tmp/a.csv The Problem I can't run a sudo command ...
3
votes
2answers
13k views

Limit a user to his own home directory

I have a user who can even use sudo. I want to limit his access to his home directory only. nothing else at all. I created a group ' limited ' and moved him to this group. Now What? How shall I ...
3
votes
3answers
759 views

Debian - Disable console access for specific user

I have a server with a git server running on it. I would like git users to be able to clone, push and pull using their linux username and password, but not to be able to login to linux console. If I ...
3
votes
2answers
227 views

Creating a user having only access to folder & sub-folder which is present in other user of the same System

I have 2 users on my ubuntu system, User1 and User2. I have a directory(folder) in User1 as /home/User1/Software and I want to set this Software folder as home directory of User2 so that whenever ...
0
votes
1answer
1k views

Creating a new FTP user and giving him only the right to 1 folder [duplicate]

I have a Linux Debian machine that I own (root access). I would like to create a new user called "testuser" and give him the right to view, edit and delete files from only one specific folder ...
2
votes
1answer
1k views

Restrict SFTP users to different directories

How can I restrict some users/groups to some directories? I mean different users, different directories. What I have: Ubuntu 14. Experience with Ubuntu: Just started. What I have tried: I read this ...
2
votes
0answers
145 views

Restrict all FTP Accounts to a single directory [duplicate]

I am trying to restrict all FTP users to the directory /jannik with the vsftp-daemon. I don't want them to go anywhere but the folder /jannik and it's sub-folders. Also, I don't want them to have ...
-2
votes
2answers
440 views

How to prevent selected users from using “newgrp” with a password [closed]

I'd like to know how can I avoid add some users to a group? I need to avoid some users join to a group --I want to lock a group from some users, not all. Details lgroupmod -L dba ==> This ...
4
votes
2answers
3k views

How can I set up one-way scp?

I've got a remote server my.server.com and I'd like to allow another user (stranger) to scp files onto the box. Goals: give as little access to the stranger user as possible stranger should not be ...
1
vote
2answers
182 views

Dialog Script break sequence

I am trying to create a console based menu for sshing to devices within our network, but I don't want the user to be able to break out of the menu. Would dialog work in this case? If not do I have any ...
1
vote
0answers
58 views

Allow move but not put in internal-sftp

is it possible with the internal-sftp to allow mv command from dir A to B but not allow put to A?
2
votes
2answers
5k views

chroot ssh users to home directory

How can one chroot ssh users to their home directories? This is what i have set in my sshd_config file: ChrootDirectory %h Subsystem sftp /usr/libexec/openssh/sftp-server ssh version is 6....
1
vote
2answers
168 views

Disallow `apt-get`, `yum` to install setuid binaries when itself run via sudo

Assume you can install something on a system because you have sudo rights to do so, but only have sudo rights for the installer. In that case it is fairly easy to create a package that installs a ...
3
votes
0answers
539 views

Restrict the maximum number of independent IP connection on specific port at the same time

I set up a server as a socks5 proxy. I'd like restrict the maximum number(1 or 5 or 20) independent IP connection on specific port at the same time. I have searched on google, only see some articles ...
0
votes
1answer
281 views

Restrict SSH users to SFTP

How to configure an SSH server to only allow users to transfer files using the SFTP protocol, without being able to log in with their username ? Note: If the user's shell to nologin or null is not ...
3
votes
0answers
867 views

Restrict SSH access to git usage only

Using: ssh-keygen -O force-command="/bin/restricted-command", or command="/bin/restricted-command" at the beginning of an authorized_keys line one can force a key-based SSH connection to execute ...
8
votes
3answers
22k views

Can a command be executed over ssh with a nologin user?

If a user has loginShell=/sbin/nologin is it still possible to ssh user@machine [command] assuming that the user has proper ssh keys in its home directory that can be used to authenticate? My goal ...
0
votes
1answer
117 views

How to create user with only SSH permissions [duplicate]

I need to create a user which can SSH to a server, but can not run any commands or view anything, for the purposes of tunneling the connection without risk of revealing credentials. How do I do this? ...
3
votes
1answer
544 views

Is there an alternative to using rbash to restrict a user on my system?

Basically at the moment I am using rbash to stop a user from leaving his directory on my system. The problem with this is, there is a script in my bin which he needs to be able to run from a script in ...
1
vote
0answers
182 views

Is it possible to edit vsftpd.conf giving ftp access to an user to only a few directories inside the server?

I want to know if a user can access multiple directories in a ftp server and no other directories. I want access to more than 1 directory. I know how to restrict access to a single directory by giving ...
6
votes
1answer
419 views

What default shell to use for an SSH user limited to a single command

When limiting a user to a single command via ssh, what default shell should be used for the user? This is a follow up to how can shellshock be exploited over SSH? I have a machine that is running an ...
0
votes
0answers
94 views

Create a user who cannot explore system directories

I have a Centos 6.5 machine. I add users with useradd username. These users cannot browse other users directory, but they can browse all the OS filesystem starting from / and see configuration, ...
1
vote
0answers
396 views

How to create a SOCKS only group?

I am currently trying to set up a user group that can connect to a server over SSH but only proxy through it. They can't see any files or run any commands. Users in the group would also be able to use ...
1
vote
0answers
71 views

User that can be accessed only from other user account

I have a number of users (23) but I want to create another user that can be accessed only from one of the user account to do some specific task. How can I do it. And obviously this user cannot be root....
5
votes
1answer
1k views

How can I lock down a user account to the point that it can read/write/execute as little as possible?

I would like to lock down an Arch Linux user account to the maximum extent possible. The only functionality required for the account is to accept a non-terminal SSH session which allows the client to ...
2
votes
1answer
1k views

can't find my user name in /etc/passwd nor name of my initial group in /etc/group

Here is what i get: [zehu@danville ~]$ groups apl vboxusers [zehu@danville ~]$ [zehu@danville ~]$ grep zehu /etc/passwd [zehu@danville ~]$ [zehu@danville ~]$ grep apl /etc/group [zehu@danville ~]...
2
votes
2answers
3k views

Create guest account with restricted access to applications

I'm trying to create a guest account in arch linux that only allows the user to use simple applications like firefox. I do not want them to have access to programs like terminal or grub-customizer etc....
4
votes
0answers
297 views

Restricting access to just CVS and Git commands

At work we have a server which hosts our CVS repository and in order to restrict shell access to this system, I have deployed rssh which has worked well for a number of years. We are now converting ...