|
|
SMB, samba and jag
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
I not to happy with the out of the box samba options in jag.
Have earlier (in os x 10.1.x) installed samba, and found it pretty usefull. Configuring the samba trough html felt nice and clean and with endless options.
So, how can I take more adventage of the built in samba in x in an easy manner? OR/AND can I install samba as I did in 10.1.x and run it on the side without it conflicting with the built in samba-jag solution?
�ny ideas?
Thanks in advance, from a none-*nix guru.
|
Sniffer gone old-school sig
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
BTW: My needs is mainly file sharing in LAN and to have options of sharing more than my homefolder and without to much restrictions.. Right now I have to setup extra useraccounts in X in order to set up a share.. That kind of sux..
|
Sniffer gone old-school sig
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2001
Location: california
Status:
Offline
|
|
here's a little unix stuff:
in the file smb.conf (i really forget where it is.. i moved mine and i don't remember the original place - can someone help out here?)
you'll need to use your root account to edit this file, for example:
"sudo pico /etc/smb.conf" in terminal.app
there's a [global] section where you put global options:
[global]
netbios name = name
workgroup = workgroup
hide dot files = yes
guest account = nobody
map to guest = bad user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
then there are the share sections:
[sharename]
comment = "sharename"
path = /path
browseable = yes
public = yes
writeable = no
write list = @staff
guest ok = yes
change "netbios name" and "workgroup" to whatever you want.
"writeable = no" makes your share write-protected by default, and "write list = @staff" lets users configured on your computer write to the share. you'll have to run "smbpasswd username" to assign them a password for SMB sharing.
if you want to find smb.conf, do this in terminal.app (without the quotes):
"sudo find / -name smb.conf"
it should print out locations of smb.conf.. i think that jaguar has it by default in /usr/lib/something/something/
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: May 2000
Location: Belgium
Status:
Offline
|
|
Or, if you want SWAT again (the HTML interface you referred to), edit your /etc/inetd.conf file and insert the following line
Code:
swat stream tcp nowait.400 root /usr/sbin/swat swat
It's possible that this one is already in there but preceeded with a #. In that case just remove the #.
Then you'll either have to reboot or restart inetd which you can do by opening the terminal and entering
Code:
kill -HUP `cat /private/var/run/inetd.pid`
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
Wow, great! Thanks for the replays folks!
|
Sniffer gone old-school sig
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
Originally posted by Evinyatar:
Or, if you want SWAT again (the HTML interface you referred to), edit your /etc/inetd.conf file and insert the following line
Code:
swat stream tcp nowait.400 root /usr/sbin/swat swat
It's possible that this one is already in there but preceeded with a #. In that case just remove the #.
Then you'll either have to reboot or restart inetd which you can do by opening the terminal and entering
Code:
kill -HUP `cat /private/var/run/inetd.pid`
Didn't find the lines you refers to above in the config file, so that have to be added.
But do you know where I can find the html file to start swat?
|
Sniffer gone old-school sig
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
Originally posted by superlarry:
here's a little unix stuff:
in the file smb.conf (i really forget where it is.. i moved mine and i don't remember the original place - can someone help out here?)
you'll need to use your root account to edit this file, for example:
"sudo pico /etc/smb.conf" in terminal.app
there's a [global] section where you put global options:
[global]
netbios name = name
workgroup = workgroup
hide dot files = yes
guest account = nobody
map to guest = bad user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
then there are the share sections:
[sharename]
comment = "sharename"
path = /path
browseable = yes
public = yes
writeable = no
write list = @staff
guest ok = yes
change "netbios name" and "workgroup" to whatever you want.
"writeable = no" makes your share write-protected by default, and "write list = @staff" lets users configured on your computer write to the share. you'll have to run "smbpasswd username" to assign them a password for SMB sharing.
if you want to find smb.conf, do this in terminal.app (without the quotes):
"sudo find / -name smb.conf"
it should print out locations of smb.conf.. i think that jaguar has it by default in /usr/lib/something/something/
Your config lines worked nicely. smb.conf also refers to a man smb.conf, but it didn't seem to be implented. This works nice with one share, but it names the share "sharename" and I still haven't found out how I give the shares different names. This means that I can only have one share at a time. Do you know how I add the name to a share?
|
Sniffer gone old-school sig
|
|
|
|
|
|
|
|
Senior User
Join Date: Dec 2001
Location: England, UK
Status:
Offline
|
|
Did you consider changing the [sharename] and 'sharename' in the /etc/smb.conf file to something else?
For reference, here's the contents of smb.conf on my PowerBook;
; Template configuration file for smbd.
; =======================================
; For the format of this file and comprehensive descriptions of all the
; configuration option, please refer to the man page for smb.conf(5).
;
; The following configuration should suit most systems for basic usage and
; initial testing. It gives all clients access to their home directories and
; allows access to all printers specified in /etc/printcap. It also provides
; a public share point for generally exporting stuff.
;
; Some things to check out:
;
; 1: Make sure that the user specified in "guest account" exists. Typically
; this will be a user that cannot log in and has minimal privileges.
; Often the "nobody" account doesn't work (very system dependant).
;
; 2: You should consider the "security =" option. See a full description
; in the main documentation and the smb.conf(5) manual page
;
; 3: Look at the "hosts allow" option, unless you want everyone on the internet
; to be able to access the shares you export here.
;
; 4: If you want to support printers, add/uncomment the relevant entries.
;
[global]
netbios name = Pismo
workgroup = WORKGROUP
client code page = 437
coding system = utf8
guest account = unknown
encrypt passwords = yes
hide dot files = yes
[homes]
comment = User Home Directories
browseable = no
read only = no
create mode = 0750
[x]
comment = Root level of Pismo HD
path = /
writable = yes
[volumes]
comment = CDs, disk images and network volumes
path = /Volumes
writable = yes
;[public]
; path = /tmp
; public = yes
; only guest = yes
; writable = yes
; printable = no
;[printers]
; comment = All Printers
; browseable = no
; printable = yes
; public = no
; writable = no
; create mode = 0700
There are 2 shares (in addition to the Apple-supplied Home share) created here - 'X' and 'Volumes'. That should give you all the info you need
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
I started swat (using xinetd -- don;t use inetd anymore, it's deprecated under 10.2). I couldn't figure out what user to use for logging in, so I tried my UNIX account. It worked, but the GUI would only allow me to view the configuration, not edit it.
Anyone using swat successfully to edit the configuration?
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
Originally posted by GFive:
Did you consider changing the [sharename] and 'sharename' in the /etc/smb.conf file to something else?
Yes I tried that. I thought it was wierd it didn't work when I tried. I'll guess smb/windows sharing/samba have to be restarted to make the new changes in smb.conf fully operative. Thought it seemed like many of the changes I did in smb.conf worked right away without restarting smb/windows sharing, so I didn't think about restarting the service.
But hey.. I am learning here!..
Thanks!
|
Sniffer gone old-school sig
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
BTW: Do you know where I can find some references for the smb.conf setup? "client code page = 437" and "create mode = 0750" e.g., does sound a little cryptic for me.. :9
And, how do you restart samba trough terminal? (I am curious)
(
Last edited by sniffer; Nov 6, 2002 at 03:37 AM.
)
|
Sniffer gone old-school sig
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
Originally posted by Arkham_c:
I started swat (using xinetd -- don;t use inetd anymore, it's deprecated under 10.2). I couldn't figure out what user to use for logging in, so I tried my UNIX account. It worked, but the GUI would only allow me to view the configuration, not edit it.
Anyone using swat successfully to edit the configuration?
It's possible that I used root account the last time I used swat..
|
Sniffer gone old-school sig
|
|
|
|
|
|
|
|
Senior User
Join Date: Dec 2001
Location: England, UK
Status:
Offline
|
|
Originally posted by sniffer:
BTW: Do you know where I can find some references for the smb.conf setup? "client code page = 437" and "create mode = 0750" e.g., does sound a little cryptic for me.. :9
And, how do you restart samba trough terminal? (I am curious)
You could try reading through some of the Samba/SMB-related HTML-formatted man pages in /usr/share/swat/help
/usr/share/swat/help/smb.conf.5.html certainly has a lot of useful information on the /etc/smb.conf options so that'd probably be a good place to start.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
Great! Thanks (again)!
I'll dig into that when I am back at my mac again...
|
Sniffer gone old-school sig
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|