[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Jailkit-users] Problem with jailkit on Suse 10.0...
From: |
Stephen Tallowitz |
Subject: |
Re: [Jailkit-users] Problem with jailkit on Suse 10.0... |
Date: |
Thu, 10 Nov 2005 20:05:26 +0100 |
Hello Olivier,
> ahh excellent, I should release a new version soon then. Please let me
> know if you encounter any other problems. Please look into the new
> utility jk_jailuser too, it can be used to move an existing user into a
> jail.
awakened by your call for testing, I've done just that (source code fresh from
CVS from a few minutes ago). There are still a few errors. Here was my testing
procedure:
1. useradd -m -g users jailtest
2. passwd jailtest
3. Login with jailtest, test a little, create some files. directory listing:
drwxr-xr-x 3 jailtest users 4096 10. Nov 19:21 .
drwxr-xr-x 7 root root 4096 10. Nov 19:15 ..
-rw------- 1 jailtest users 173 10. Nov 19:20 .bash_history
-rw-r--r-- 1 jailtest users 240 10. Nov 19:15 .bash_logout
-rw-r--r-- 1 jailtest users 308 10. Nov 19:15 .bash_profile
-rw-r--r-- 1 jailtest users 1301 10. Nov 19:15 .bashrc
-rw-r--r-- 1 jailtest users 0 10. Nov 19:15 .keep
drwxr-xr-x 5 jailtest users 4096 10. Nov 19:15 .maildir
-rw-r--r-- 1 jailtest users 1466 10. Nov 19:15 .tcsh.config
-rw-r--r-- 1 root root 13 10. Nov 19:20 testbyroot.txt
-rw-r--r-- 1 jailtest users 5 10. Nov 19:19 test.txt
-rw------- 1 jailtest users 701 10. Nov 19:21 .viminfo
-rw------- 1 jailtest users 52 10. Nov 19:21 .xauthVqwSJN
3. mkdir /srv/jaily
4. jk_init -v /srv/jaily basicshell
now the interesting bit:
5a. jk_jailuser -j /srv/jaily -v -n -s /bin/bash -m
this really fooled me for a moment, because no output was produced, not even an
error message about forgetting the username ;-)
5b. next try was:
myhost cvs-src # jk_jailuser -j /srv/jaily -v -n -s /bin/bash -m jailtest
Traceback (most recent call last):
File "/usr/sbin/jk_jailuser", line 248, in ?
main()
File "/usr/sbin/jk_jailuser", line 239, in main
jailuser(jail, username, movehome, config)
UnboundLocalError: local variable 'movehome' referenced before assignment
5c. after editing /usr/sbin/jk_jailuser to include the else:
if (config['movehome'] == -1):
movehome = getmovehome(jail, username, config)
else:
movehome = config['movehome']
jailuser(jail, username, movehome, config)
5d. I get:
myhost cvs-src # jk_jailuser -j /srv/jaily -v -s /bin/bash -m jailtest
adding user jailtest to /srv/jaily/etc/passwd with shell /bin/bash
adding group users to /srv/jaily/etc/group
modify user jailtest; dir /srv/jaily/./home/jailtest/ and shell
/usr/sbin/jk_chrootsh
creating directory /srv/jaily/./home/jailtest
moving files from /home/jailtest/ to /srv/jaily/./home/jailtest/
Traceback (most recent call last):
File "/usr/sbin/jk_jailuser", line 250, in ?
main()
File "/usr/sbin/jk_jailuser", line 241, in main
jailuser(jail, username, movehome, config)
File "/usr/sbin/jk_jailuser", line 146, in jailuser
os.rename(pw[5], newhome)
OSError: [Errno 18] Invalid cross-device link
5e. I'll try figuring out this problem later this evening.
Cheers,
Stephen
- Re: [Jailkit-users] Problem with jailkit on Suse 10.0..., (continued)
- Re: [Jailkit-users] Problem with jailkit on Suse 10.0..., Olivier Sessink, 2005/11/07
- RE: [Jailkit-users] Problem with jailkit on Suse 10.0..., Paul Brooks, 2005/11/07
- Re: [Jailkit-users] Problem with jailkit on Suse 10.0..., Olivier Sessink, 2005/11/07
- RE: [Jailkit-users] Problem with jailkit on Suse 10.0..., Paul Brooks, 2005/11/07
- Re: [Jailkit-users] Problem with jailkit on Suse 10.0..., Olivier Sessink, 2005/11/07
- RE: [Jailkit-users] Problem with jailkit on Suse 10.0..., Paul Brooks, 2005/11/08
- RE: [Jailkit-users] Problem with jailkit on Suse 10.0..., Paul Brooks, 2005/11/08
- Re: [Jailkit-users] Problem with jailkit on Suse 10.0..., Olivier Sessink, 2005/11/08
- RE: [Jailkit-users] Problem with jailkit on Suse 10.0..., Paul Brooks, 2005/11/10
- Re: [Jailkit-users] Problem with jailkit on Suse 10.0..., Olivier Sessink, 2005/11/10
- Re: [Jailkit-users] Problem with jailkit on Suse 10.0...,
Stephen Tallowitz <=
- [Jailkit-users] jk_jailuser bug fixed, Olivier Sessink, 2005/11/10