Limit Linux Debian user privilleges

06
2014-04
  • Daniel

    Hi I need to create user on Linux Debian that can only access /usr/src/xxx catalog and use screen command to run server. Could you help me with it? I would be really thankful. Have a nice day!

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    mon installation in Linux/Debian
  • sjain

    Hi I am installing mon in Debian?linux using command apt-get install mon

    But It's showing the error and aborting the installation. error is like :

    apt-get install mon

    Reading package lists... Done

    Building dependency tree

    Reading state information... Done

    The following NEW packages will be installed:

    mon 0 upgraded, 1 newly installed, 0 to remove and 109 not upgraded.

    Need to get 0B/179kB of archives.

    After this operation, 741kB of additional disk space will be used.

    (Reading database ... 106004 files and directories currently installed.)

    Unpacking mon (from .../mon_0.99.2-13_i386.deb) ...

    Looking for user name availability (mon)... already taken.

    Installation aborted!

    dpkg: error processing /var/cache/apt/archives/mon_0.99.2-13_i386.deb (--unpack):

    subprocess pre-installation script returned error exit status 1

    Errors were encountered while processing:

    /var/cache/apt/archives/mon_0.99.2-13_i386.deb

    E: Sub-process /usr/bin/dpkg returned an error code (1)


  • Related Answers
  • Gilles

    Looking for user name availability (mon)... already taken.

    The mon program runs as a dedicated system user also called mon. The installer tried to create this system user, but there is already a user with this name on your system.

    If you can remove or rename the existing mon user (and group if you also have one), this will let you install the mon package. Otherwise you'll have to pick a different name to run the mon program under, which requires modifying and recompiling the source package.


    EDIT: Here's how to rename the existing mon user to newname (pick a better name), at least the easy part. I assume this is a local user, not a NIS or LDAP user (otherwise the resolution would be very different). It's ok if some of the mv commands are for files that don't exist, just skip them.

    usermod -l newname mon
    groupmod -n newname mon
    mv /var/spool/cron/crontabs/mon /var/spool/cron/crontabs/newname
    mv /var/spool/main/mon /var/spool/main/newname
    

    The hard part is finding any reference you have on your system to the old mon user name. There's no hard-and-fast rule for this, it depends a lot on what that user's been doing.

  • Janne Pikkarainen

    Sounds like that mon deb package was not transferred completely or it was otherwise corrupted.

    What if you perform

    rm -f /var/cache/apt/archives/mon_0.99.2-13_i386.deb
    

    and then retry the installation?