Sponsored Content
Top Forums UNIX for Advanced & Expert Users Prevent user from creating new user from his login Post 303032103 by as7951 on Monday 11th of March 2019 12:39:54 PM
Old 03-11-2019
Hi Jim,

i want to create one user and do not want that user to run userdel and useradd command.
Only intention is to prevent user from running useradd and userdel commands only on Redhat 7.2
other than this , he can be able to perform anyother task.

In short user should not be able to execute useradd and userdel command from his login.

--- Post updated at 11:39 AM ---

Hi Bakunin,

Thank you for such a nice explanation.
Apologies as i know i am asking the same question again. But need help on this to understand more
But is there any way/command if we can disable only two commands(useradd and userdel) for any particular user.

we don't want user to create and delete any user on he system

I want to create one user and do not want that user to run userdel and useradd command on system
Only intention is to prevent user from running useradd and userdel commands only on Redhat 7.2
other than this , he can be able to perform anyother task.

In short user should not be able to execute useradd and userdel command from his login.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Creating a user that can't login

I need to set up/modify a user account on one of our machines which will allow the user to stay on the system, but not use their user id and password to login to the machine. It is for the purposes of an ftp user, so that nobody can then login as ftp/passwd. Ta.:) (2 Replies)
Discussion started by: danhodges99
2 Replies

2. AIX

Limiting length of user in while creating user

Hi all, I am a newbe to aix 5.2. I want to specify the characters used by users while creating user in aix like specifying the length of the password should i use some sript for that if it is then please let me know how to do this if yes give me the link for the scripts. Thanks in advance ... (2 Replies)
Discussion started by: Satya Mishra
2 Replies

3. UNIX for Dummies Questions & Answers

I create user but i cant login the user i created.

I created a user, i login as a root. I add him in the group where he can access and login as a root! I checked it in users' list and in group's list, he is there. My problem is this, I cant login using the username/account I just created! What should i do to use and login the user/account i've just... (5 Replies)
Discussion started by: jerome
5 Replies

4. Shell Programming and Scripting

Running script from other user rather than login user

Hi, My requirement is that i am login from ROOT in a script but when any command is coming which is logging to sqlplus then i have to run it with normal user as only normal user have permission to connect to sqlplus . i tried making a script like this : #! /bin/ksh su -... (3 Replies)
Discussion started by: rawatds
3 Replies

5. Cybersecurity

prevent user from excute command

Dears I want to prevent users from doing spesific command "history -c" or "history" in general How can I do ? (4 Replies)
Discussion started by: reaky
4 Replies

6. IP Networking

how to prevent a user from downloading on lan

hi all, i want to prevent users downloading files in the office as bandwidth becomes very low and affects work. one of my friend tried to close the connection using ethercap but this does not work. i have a debian desktop while other users use MS W!ndows. Please provide any help. Thanks (5 Replies)
Discussion started by: coolatt
5 Replies

7. Shell Programming and Scripting

How to Login as another user through Shell script from current user[Not Root]

Hi Every body, I would need a shell script program to login as different user and perform some copy commands in the script. example: Supppose ora_toms is the active user ora_toms should be able to run a script where user: ftptomsp pass: XXX should login through and run the commands ... (9 Replies)
Discussion started by: ujjwal27
9 Replies

8. Shell Programming and Scripting

Login into another user from user inside script

now i have logged in username : ramesh in unix Now i have to created script file to login into another user and have run a command inside that user and after executing the command i have to exit from that user. Inside script, i have to login into su - ram along with password : haihow and have to... (4 Replies)
Discussion started by: rammm
4 Replies

9. Shell Programming and Scripting

Prevent the user from changing his directory

Hi could some let me know how to prevent user from changing his home directory....... Thanks in advance.... (1 Reply)
Discussion started by: Revanth547
1 Replies

10. Shell Programming and Scripting

Prevent the user from changing his directory

Hi could some let me know how to prevent user from changing his home directory....... Thanks in advance.... (6 Replies)
Discussion started by: rahul547
6 Replies
VIRT-LOGIN-SHELL(1)					      Virtualization Support					       VIRT-LOGIN-SHELL(1)

NAME
virt-login-shell - tool to execute a shell within a container matching the users name SYNOPSIS
virt-login-shell DESCRIPTION
The virt-login-shell program is a setuid shell that is used to join an LXC container that matches the user's name. If the container is not running, virt-login-shell will attempt to start the container. virt-sandbox-shell is not allowed to be run by root. Normal users will get added to a container that matches their username, if it exists, and they are configured in /etc/libvirt/virt-login-shell.conf. The basic structure of most virt-login-shell usage is: virt-login-shell OPTIONS
-h, --help Display command line help usage then exit. -V, --version Display version information then exit. CONFIG
By default, virt-login-shell will execute the /bin/sh program for the user. You can modify this behaviour by defining the shell variable in /etc/libvirt/virt-login-shell.conf. eg. shell = [ "/bin/ksh", "--login"] By default no users are allowed to use virt-login-shell, if you want to allow certain users to use virt-login-shell, you need to modify the allowed_users variable in /etc/libvirt/virt-login-shell.conf. eg. allowed_users = [ "tom", "dick", "harry" ] BUGS
Report any bugs discovered to the libvirt community via the mailing list "http://libvirt.org/contact.html" or bug tracker "http://libvirt.org/bugs.html". Alternatively report bugs to your software distributor / vendor. AUTHORS
Please refer to the AUTHORS file distributed with libvirt. Daniel Walsh <dwalsh at redhat dot com> COPYRIGHT
Copyright (C) 2013 Red Hat, Inc., and the authors listed in the libvirt AUTHORS file. LICENSE
virt-login-shell is distributed under the terms of the GNU LGPL v2+. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE SEE ALSO
virsh(1), <http://www.libvirt.org/> libvirt-1.1.1 2014-06-17 VIRT-LOGIN-SHELL(1)
All times are GMT -4. The time now is 04:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy