Trying to find a better way to check $REMOTE_USER against a list of permiited users. The only way I can get it to work is to do a bunch of or statements shown here. My list of permitted users will be a dozen or so, I was hoping to list them in a variable or a file.
Hi! I have a simple question about using a for loop.
I'm trying to open up all the zip files in the currect directory with ark, but I am getting the error "bash: syntax error near unexpected token `for $i ; do ark $i ; done ;
I looked in the info pages for bash, but I can't seem to figure... (2 Replies)
I am trying to write a small (and rather simple) script to gather some info about the system and piping it to dzen2
first, i want to explain some things.
I know i could have used conky, but my intention was to expand my knowledge of bash, pipes and redirections inside a script, and to have fun... (14 Replies)
Hello,
Could you put some light on this:
> echo "ref_categorie=test" | cut -c1-15-
test
> echo "ref_categorie=test" | cut -c1-14-
=test
echo "ref_categorie=test" | cut -c15-
test
echo "ref_categorie=test" | cut -c15
t
>
It's executed on AIX if that matters. The man page is not very... (2 Replies)
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
I have a start|stop|restart script for a custom app we have. After it tries to stop our process the correct way, it checks to see if it's gone, if not it tries to kill it, if that doesn't work kill -9.
If I run kill -9 on the PID from the command line it kills it and all is well. If I have the... (1 Reply)
I'm writing a bash script to log some selections from a sensors output (core temp, mb temp, etc.) and I would also like to have the current cpu usage as a percentage. I have no idea how to go about getting it in a form that a bash script can use. For example, I would simply look in the output of... (3 Replies)
Dear mentors, I just need little explanation regarding for loop to give input to awk script
for file in `ls *.txt |sort -t"_" -k2n,2`; do
awk script $file
done
which sorts file in order, and will input one after another file in order to awk script
suppose if I have to input 2 or... (4 Replies)
Some question about the usage of shell scripts:
1.) Are the commands of the base shell scripts a subset of bash commands?
2.) Assume I got a long, long script WITHOUT the first line.
How can I find out if the script was originally designed für "sh" or "bash"?
3.) How can I check a given... (3 Replies)
Discussion started by: pstein
3 Replies
LEARN ABOUT CENTOS
virt-login-shell
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)