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. Nobody else must see or have access to this user.

I don't have any idea how to do it, any attempt I did yesterday doesn't satisfy my conditions.

Update (explanation) :

It's like a user inside other user. A user (hiddenUser in the graph) that can't only be accessed if you are user2 (graph). Graph : - user1 | - user2 | | | - hiddenUser | - user3

  • have a look at sudo, e.g. sudo taskuser ls -l. try man sudoers. I'll gave more details later. – Archemar Sep 28 '14 at 21:16
  • I agree with @Archemar Add to that setting up this user account without a password (or with an expired password) so that no one is able to log in as that user. People would still be able to "see" the user account though: a simple getent passwd would suffice. – Joseph R. Sep 28 '14 at 21:19
  • you can create a new group and add the two users to that group. – redoc Sep 28 '14 at 21:31
  • 2
    Please elaborate what exactly you have tried yesterday. This will help produce good answers. – Sebastian Sep 28 '14 at 21:58
  • Please elaborate on the "nobody else can see this user" requirement. What in your mind does this actually mean? – slm Sep 28 '14 at 23:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.