1VIRT-LOGIN-SHELL(1)         Virtualization Support         VIRT-LOGIN-SHELL(1)
2
3
4

NAME

6       virt-login-shell - tool to execute a shell within a container
7

SYNOPSIS

9       virt-login-shell [OPTION]
10

DESCRIPTION

12       The  virt-login-shell program is a setuid shell that is used to join an
13       LXC container that matches the user's name.  If the  container  is  not
14       running,   virt-login-shell   will  attempt  to  start  the  container.
15       virt-login-shell is not allowed to be run by root.  Normal  users  will
16       get added to a container that matches their username, if it exists, and
17       they are configured in /etc/libvirt/virt-login-shell.conf.
18
19       The basic structure of most virt-login-shell usage is:
20
21          virt-login-shell
22

OPTIONS

24       -c CMD
25
26       Instruct the shell to run CMD  instead  of  presenting  an  interactive
27       shell prompt.
28
29       -h, --help
30
31       Display command line help usage then exit.
32
33       -V, --version
34
35       Display version information then exit.
36

CONFIG

38       By  default,  virt-login-shell will execute the /bin/sh program for the
39       user. You can modify this behaviour by defining the shell  variable  in
40       /etc/libvirt/virt-login-shell.conf. e.g.
41
42          shell = [ "/bin/bash" ]
43
44       If the auto_shell config option is set then it will attempt to automat‐
45       ically detect the shell from /etc/password inside the  container.  This
46       should only be done if the container has a separate /etc directory from
47       the   host,   otherwise   it   will   end   up   recursively   invoking
48       virt-login-shell. e.g.
49
50          auto_shell = 1
51
52       By default no users are allowed to use virt-login-shell, if you want to
53       allow certain users to use virt-login-shell, you  need  to  modify  the
54       allowed_users variable in /etc/libvirt/virt-login-shell.conf. e.g.
55
56          allowed_users = [ "tom", "dick", "harry" ]
57

EXIT STATUS

59       virt-login-shell  normally  returns  the  exit status of the command it
60       executed. If the command was killed by a signal, but that signal is not
61       fatal to virt-login-shell, then it returns the signal number plus 128.
62
63       Exit status generated by virt-login-shell itself:
64
65       · 0 An option was used to learn more about this binary.
66
67       · 125  Generic  error  before  attempting  execution  of the configured
68         shell; for example, if libvirtd is not running.
69
70       · 126 The configured shell exists but could not be executed.
71
72       · 127 The configured shell could not be found.
73

BUGS

75       Please report all bugs you discover.  This should be done via either:
76
77       1. the mailing list
78
79          https://libvirt.org/contact.html
80
81       2. the bug tracker
82
83          https://libvirt.org/bugs.html
84
85       Alternatively, you may report bugs to your software distributor /  ven‐
86       dor.
87

AUTHOR

89       Daniel Walsh
90
92       Copyright  (C)  2013-2014  Red Hat, Inc., and the authors listed in the
93       libvirt AUTHORS file.
94

LICENSE

96       virt-login-shell is distributed under the terms of the  GNU  LGPL  v2+.
97       This  is free software; see the source for copying conditions. There is
98       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
99       PURPOSE
100

SEE ALSO

102       virsh(1), https://libvirt.org/
103
104
105
106
107                                                           VIRT-LOGIN-SHELL(1)
Impressum