PDA

View Full Version : [ubuntu] setup user with very limited access on the server


boondocks
August 1st, 2009, 07:39 PM
On a Ubuntu 8.04 server, I want to create a user "dataentry".
Being a server, "dataentry" can only login via the command line.

I want the "dataentry" user to have very limited acess:

He logs in.
System will immediately run the "/home/dataentry/tasks" application.
He exits this application.
System will immediately log him out.

So this user is severly restricted:

He cannot have any kind of shell access.
He cannot run any application except "/home/dataentry/tasks".


How do you create this user?
How do you configure/apply these restrictions?

fakrulalam
August 2nd, 2009, 01:58 PM
Hi
~/.bashrc is the file which define all the configuration/environment variable after a user login. You can run the "/home/dataentry/tasks" application from this location after user logged in. The automatic exit can be done from your "/home/dataentry/tasks" application by just adding exit command when user exit to the application.

boondocks
August 2nd, 2009, 05:45 PM
I cannot modify the "/home/dataentry/tasks" application.

But, if I the last 2 lines in "~/.bashrc" are:
/home/dataentry/tasks
exit
Will that be enough?

boondocks
August 3rd, 2009, 06:05 AM
Hi
~/.bashrc is the file which define all the configuration/environment variable after a user login. You can run the "/home/dataentry/tasks" application from this location after user logged in. The automatic exit can be done from your "/home/dataentry/tasks" application by just adding exit command when user exit to the application.

I put "/home/dataentry/tasks" as the last in ~/.bashrc
But that did not do anything.

So I put "/home/dataentry/tasks" as the last in ~/.bash_profile
But that did not do anything either.

What did I miss?