The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
46 views

Create a user that can only connect to a specific directory

I've created a SSH folder for some friends. I've created the users to log in via SSH, but they connect to ~ how can I set to which folder they can connect? I have a directory called /usbdrv/ which ...
3
votes
2answers
71 views

Denying “/opt/” access for SFTP Users other than particular dir

This is my first (newbie) post here in unix stackexchange. I want to use my WebServer (Debian) as SFTPServer giving access to particular employees. The dir structure is as follows under root: ...
2
votes
1answer
29 views

Block local (unix) users from sending mail

Is there a way to block a local/unix user (or a list of local users) from sending mails via mail command (or maybe even in postfix, which is the MTA I have).
12
votes
4answers
9k 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 ...
5
votes
3answers
257 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 ...
3
votes
2answers
175 views

Restrict password-less backup with SFTP

I need to perform backup of a server to my computer using Duplicity: duplicity /etc sftp://backup@my.dynamic.ip.address//home/backup Before this can be done, I need to allow password-less access by ...
2
votes
0answers
57 views

How to restrict directory name creation to pattern?

I have FreeNas CIFS share. Mount command result: /dev/ufs/VSPHERE on /mnt/VSPHERE (ufs, NFS exported, local, soft-updates, nfsv4acls) I want to restrict users from creating directories that do not ...
8
votes
2answers
2k views

How to restrict an SSH user to only allow SSH-tunneling?

How can I restrict a user on the ssh server to allow them only the priviledges for SSH TUNNELING? i.e. So they cannot run commands even if they log in via ssh. My Linux servers are Ubuntu 11.04 and ...
0
votes
1answer
83 views

list of all linux commands which are not for selection [closed]

I made a small interface for making some simple linux commands. The sort of commands one can enter are very limited and I'm certain no one would do anything intentionally malicious, however I want a ...
4
votes
2answers
1k views

Give user read/write access to only one directory

I'm running a server, and I need to give read/write access to a particular directory to a single user. I've tried the following: sudo adduser abcd sudo groupadd abcdefg chown -R .abcdefg ...
2
votes
3answers
170 views

What happens if I delete all user passwords?

I have a Fedora VPS with a root user that has no password. I login with SSH keys. I had another, less privileged account on that server, used for web administration. I've now deleted its password ...
1
vote
2answers
6k views

vsftpd - Limit FTP access only to /var/www

I am running vsftpd as ftp server on my linux (rasbian), I log in to the machine as a root user. I would like to be still locked to using only /var/www, how can I configure vsftpd conf to accomplish ...
1
vote
1answer
90 views

at.allow and at.deny precedence (in Ubuntu)?

It's clear from documentation about cron that if cron.allow and cron.den both exist then cron.allow takes precedence and it is allowed. What is the case for at.allow / at.deny? Everywhere I've ...
2
votes
3answers
327 views

Restrict standard users to run a command with a specific argument

I know how to restrict standard users to run a command by removing execute permissions for that command. But it's possible restrict standard users to run a command with a specific option/argument? ...
16
votes
4answers
2k views

Block Particular Command in Linux for Specific user

How to block command, let say mkdir for specific user ? What I did just created read-only function and store in users profile ~/.bashrc /bin/mkdir() { echo "mkdir command not allow for you" ...
1
vote
1answer
292 views

Jail only a specific user with vsftpd

I'm using both Redhat and CentOS. When I do followings: # vi /etc/vsftpd/vsftpd.conf chroot_local_user=YES # service vsftpd restart Then all users are jailed in their home directory. How can I ...
5
votes
4answers
15k 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 ...
2
votes
2answers
152 views

Bashrc disable-ing all but a given command for a given user

Is it possible to have bashrc grab every single command the user types, save for those containing a given word? Like the way you can use aliases to change what the user meant, you can alias for ...
3
votes
2answers
1k 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 ...
0
votes
0answers
103 views

Jailkit not working properly when connecting remotely from iPad via SFTP app

I used jailkit to add users and restrict them to a jail directory. It works for Linux and PC clients connecting to the ssh server but when I connect with iPad it gives them access to everything. I ...
1
vote
1answer
54 views

How do I isolate my file system data from another system root?

I have a linux machine(kubuntu 13.04) A my friend asked me give him an account with being able to use sudo. So, I made an account for him and put the account in /etc/group for him to use sudo I don't ...
8
votes
2answers
2k views

Creating a UNIX account which only executes one command

Is there a way to create a user account in Solaris which allows the users to run one command only? No login shell or anything else. I could possibly do it with /usr/bin/false in /etc/passwd and just ...
2
votes
1answer
2k views

Bash restricted Shell using rbash

I am using /bin/rbash for some users. It's working as expected but there is some hack like when users run bash or dash, then they got unrestricted shells, so to avoid these commands, I have added ...
2
votes
5answers
1k views

Create new linux account as a user without root access

Is it possible to create a non-root Linux user account without being logged in as a root user and without using sudo?
2
votes
1answer
274 views

How to associate only one public key with a restricted shell like scponly?

I'd like to use a passwordless key to perform e.g. unison synchronization while being able to SSH into the server only with a password-protected key. The usual way of using scponly is changig the ...
1
vote
0answers
55 views

Run a script (for an app GUI) when logged from NX but limit shell commands on terminal

I have a user which will be accessing an app GUI via NX NoMachine. I want to allow this user to execute the command to bring up the app GUI (done automatically by NX) BUT prevent him from executing ...
2
votes
1answer
62 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 ...
3
votes
1answer
530 views

How to “jail” a user account's network capabilities on Linux?

Linux box a is connected to a home DSL line with dynamic DNS registration, hosting a tmux session to which multiple clients connect in read-only mode over SSH. All users connect using the same ...
2
votes
1answer
699 views

SFTP: give user access to folder outside home

I have a machine running Ubuntu 12.04 LTS with OpenSSH server installed. I have created a user with a jailed home account. When I log in with the user's account, I can only access his home (duh). ...
5
votes
1answer
332 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 ...
12
votes
1answer
503 views

Can I restrict a user to use special programs?

Is it possible to add a user and restrict him to run special programs? For example after this user logs in, he can only open Firefox to use Internet and no other programs can be run by this user. For ...
2
votes
1answer
461 views

root can only login with bash restricted mode

I was implementing a series of recommendations to 'harden' my linux server, involving lots and lots of changes. Linux is CentOS 6.2, kernel 2.6.32-220.*. I'm currently using tty2..tty5 (no X/GUI etc) ...
3
votes
0answers
130 views

Restricting sound control

I need to restrict users so that they cannot output sound from built-in speakers. They should plug their headphones to hear any sound. They should be able to control headphone volume level, but not ...
11
votes
3answers
812 views

Adding a user who can only execute scripts remotely

I would like to create a user who can only do one thing: via ssh specify a script ( and commandline arguments to the script ) that resides in one particular folder ( for the purposes of this question ...
3
votes
1answer
205 views

SSH Bash Jail Session

I've seen some game tunneling service providers that jails the customer's account to a Information screen upon login and any input is ignored. Ctrl+C closes the SSH session, and disconnecting. This ...
3
votes
1answer
128 views

What is the best way to restraint/secure a workstation?

I want to prevent users to copy on usb devices and some others actions. I was thinking of using polkit. Do you think it is a good solution or does someone know some alternatives ? EDIT: I also need ...
6
votes
2answers
540 views

How to hinder root from running a script

The Glassfish application server provides scripts to administer the application server and also start and stop them and I would like to restrict the root user from running this script. The reason is ...
16
votes
2answers
4k views

Do you need a shell for SCP?

I'm allowing a friend a local account on my machine, exclusively for SCP. Can I specify his account's shell as /bin/true, or in any other way limit the account, while still allowing SCP?
4
votes
2answers
3k views

Can I create a local only guest account?

Is it possible to create a "guest" account in Linux? by "guest" account I mean an account that does not require a password to log in graphically. I want this account for when people come over and are ...