|
|
Help my Mac see my Linux Box...
|
|
|
|
Mac Enthusiast
Join Date: Dec 2002
Location: Newport Beach, CA
Status:
Offline
|
|
Can someone tell me how to get my Mac to see/mount my Linux harddrive?
I have both machines connected through a router running DHCP, the Linux box is Mandrake 9.1, the Mac OSX 10.2.4. The Linux box has all servers installed and running, and I use KDE 3.1. I can ssh and ftp locally between the two machines, so I know the router is working fine.
The Mac I am savy with, but I am new to Linux. So, please recommend GUI methods if possible. Thanks....
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jan 2003
Location: San Francisco
Status:
Offline
|
|
The software your looking for is called Samba ( www.samba.org) install that on the linux box, and config it and you should be good to go.
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2000
Status:
Offline
|
|
Nah, use netatalk instead. It's an AFP server for unix-like operating systems, so you can mount your linux box just as if it were an AppleShare server. No need to have your non-Windows machines communicating over a Windows protocol.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Dec 2002
Location: Newport Beach, CA
Status:
Offline
|
|
The software your looking for is called Samba ( www.samba.org) install that on the linux box, and config it and you should be good to go.
Oh, I already have Samba installed and running. It was part of the default install.
I select "Connect to server" on the Mac, I get a list of:
Local
MDKGROUP
WORKGROUP
I select MDKGROUP (the others have nothing listed in the next column) then get a 1 item list of: "LOCALHOST". I connect to this, and then get a popup with a pulldown menu to select a share. All the choices are the folders in the main user on my linux Box. When I select one, the Mac says "Connecting to server". At this point there is a spinning progress bar, and nothing happens.
Nah, use netatalk instead. It's an AFP server for unix-like operating systems, so you can mount your linux box just as if it were an AppleShare server. No need to have your non-Windows machines communicating over a Windows protocol.
I agree there is no reason to use a windows protocol, but the installation of the netatalk seems a little to complicated for me (at my current Linux knowledge level). I don't know, maybe I should go for it, I can always re-install
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2000
Status:
Offline
|
|
Mandrake's package management should do most of the heavy lifting for you. Just add the netatalk package, and edit the config files as you see fit. There are tutorials on the web. Do a search for things like "netatalk setup". A quick search turned up this:
http://www.linuxhelp.ca/guides/netatalk/
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Netatalk is incredibly simple to set up... even easier than Samba.
If you don't have the netatalk server RPM already installed then install it from your CDs or grab the RPM from ftp://ftp.rpmfind.net/linux/Mandrake...-2mdk.i586.rpm
Install it.
The default configuration will work fine for exporting your /home/userid folder to the Mac.
Start the service (as root):
service atalk start
On the Mac (OS 9) Chooser --> Appletalk --> localhost
Enter your userid and password then OK.
If your server doesn't appear as an Appleshare server then you may have to specify the IP address.
On the Mac OS X box it is just as easy... just click on the Net button and go from there.
|
-DU-...etc...
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Dec 2002
Location: Newport Beach, CA
Status:
Offline
|
|
OK, got it up and running thru root.
Able to connect! Not so bad....
So, do I have to start the Netatalk service everytime I boot up? If so, is there a way to have it happen automatically?
Thanks...
(
Last edited by EnVoy; Apr 4, 2003 at 12:06 PM.
)
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Originally posted by EnVoy:
OK, got it up and running thru root.
Able to connect! Not so bad....
So, do I have to start the Netatalk service everytime I boot up? If so, is there a way to have it happen automatically?
Thanks...
See it was quite easy ;-)
Yes now that you know it works the way you like you can run (as root) the command:
chkconfig --level 35 atalk on
Which will turn on the Appletalk server automatically on boot up in runlevels 3 and 5. (See man chkconfig for more details). Runlevels 3 and 5 are, respectively, "with networking services enabled" and "with networking services and GUI login enabled". Most every service can be nabled to start automagically on boot up via this method. It is all part of the ntsysv services management utility. It is common to Mandrake and Red Hat Linux. Some other distributions use the same system but not all of them. Is there something similar in Mac OS X?
Note: I have given you the commandline commands for doing these things... there are GUI tools for it also... but I don't know what they are called in MDK. The commandline is the common denominator here.
|
-DU-...etc...
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Dec 2002
Location: Newport Beach, CA
Status:
Offline
|
|
utidjian: Thanks for the help.
I figured out in the GUI how to make sure it gets enabled at boot. It's in Mandrake Control Center/System. Theres a tab/pane? for the services, and you can en/disable them, and also select to run at boot. I also disabled Samba, since I don't have any windoze machines on the network.
Is there something similar in Mac OS X?
There is in MacOSX. I'm not sure of the tech details, but in the Sharing pref pane you can turn on/off servers, and I believe if you have a server on it maintains it's state through a re-boot.
Once again, thanks for the help......
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Originally posted by EnVoy:
There is in MacOSX. I'm not sure of the tech details, but in the Sharing pref pane you can turn on/off servers, and I believe if you have a server on it maintains it's state through a re-boot.
Once again, thanks for the help......
You are welcome.
What I meant was... is there a similar commandline set of utilities for managing services in Mac OS X? I know about the GUI ones... but they either require that one be on console or running Remote Desktop. In Linux there is ALWAYS a commandline set of utilities for every service. For instance: in Mandrake and Red Hat you can use the service command for a lot of different things. It is really a shortcut for a set of service management scripts. To see everyhting that is configured and its status you can run (as root):
service --status-all
And get a list of all services, whether they are running and their current status and PID. I don't think Mac OS X has anything like this... yet.
|
-DU-...etc...
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2000
Status:
Offline
|
|
SystemStarter is similar. It's what runs all the StartupItems in /System/Library/StartupItems and /Library/StartupItems. man SystemStarter for more info. (Remarkable that Apple actually provided a manpage for once.)
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Originally posted by fitter:
SystemStarter is similar. It's what runs all the StartupItems in /System/Library/StartupItems and /Library/StartupItems. man SystemStarter for more info. (Remarkable that Apple actually provided a manpage for once.)
Yes that would be remarkable... but for some reason I don't seem to have that manpage on ANY of my Mac OS X systems including my Xserve. Be nice if it did. Seems to have a synopsis though (SystemStarter -help). Seems to have only [start|stop|restart] but no status option.
|
-DU-...etc...
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Dec 2002
Location: Newport Beach, CA
Status:
Offline
|
|
Allright so I have another question. Now that I have the Netatalk working, when I connect to my Linux box and log in a user "A" all I can see/use is user A's home directory. How do I mount the entire drive, machine, etc... Mount it as root, and not user A?
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Originally posted by EnVoy:
Allright so I have another question. Now that I have the Netatalk working, when I connect to my Linux box and log in a user "A" all I can see/use is user A's home directory. How do I mount the entire drive, machine, etc... Mount it as root, and not user A?
If I told you I would have to kill you
But seriously... it would be a really REALLY bad idea to do such a thing. It would break much of the entire security model of your Linux server. There is very little useful stuff you could accomplish by mounting the entire disk remotely that you can't accomplish via the terminal (ssh to the Linux box and log in as root if neccessary).
Are you trying to make a share folder for several users?
-DU-...etc...
|
-DU-...etc...
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Dec 2002
Location: Newport Beach, CA
Status:
Offline
|
|
Are you trying to make a share folder for several users?
Yes... I think so...
Situation:
When sitting at my Linux box, my normal everyday login is as user B. When I Netatalk from my Mac OSX box to the Linux box I login as my mac name (lets say "C"). So I copy a file from the Mac to my user C (lets say user C's "Documents" folder) on the Linux Box. Then, sitting infront of the Linux box again, I try to copy the file from user C's documents folder to, lets say. the Desktop (which would be user B's desktop folder). Doesn't allow me. I know it's a permissions thing, but it is a pain to have to log-out from user B and log-back in as user C, then change the permissions on the file, then log back in as user B. I have enabled "Allow users to share directories". I would like to just be able to copy a file over, then put it anywhere I want. I know this is all because of security, but I am the only one using the machines.
What would you suggest is the easiest way to set this up? Just use user "B" when mounting the Linux on the Mac?
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Originally posted by EnVoy:
What would you suggest is the easiest way to set this up? Just use user "B" when mounting the Linux on the Mac?
Yep... you got it. If you have one, twenty, or twenty thousand users it makes sense to have "single sign on" across all platforms.
Just be user C on both boxes. If you add a user D... make them user D on both boxes.
You could be user envoy on the Mac and user envy in Linux... IOW it doesn't really matter. It would just be simpler to have both users have the same userid and password on both boxes.
In my situation I have a lot of users and a lot of platforms (Linux on x86, PPC, and Sparc), Mac OS X, Mac OS 9, Windows 98/NT/2K, Solaris and BSD. All users can log in to ANY platform at ANY time and all their stuff is there. It is all delivered from a central server. Naturaly, laptops are handled a bit differently. Not sure why one would do it any other way.
-DU-...etc...
|
-DU-...etc...
|
|
|
|
|
|
|
|
Moderator
Join Date: May 2001
Location: Hilbert space
Status:
Offline
|
|
How about using NFS?
Extremely easy to use. Edit the exports file in /etc. Add the share point (note that symlinks can't be shared). OS X can natively mount NFS.
For testing purposes, simply open the Terminal and type ?mount_nfs [name of machine]:[name of share] [mount point]', e. g.
mount_nfs toybox:/usr/home/max /Network
mounts the share ?/usr/home/max' on my FreeBSD box ?toybox' and mounts it on '/Network'.
|
I don't suffer from insanity, I enjoy every minute of it.
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Originally posted by OreoCookie:
How about using NFS?
Yes that is also possible. I did not mention it for the same reason I didn't tell him how to export / to the Mac.
NFS is handy on a completely trusted network with trusted machines. But what network is like that... even a home network? NFS trusts the machine and not the user. IOW anyone can connect to an NFS network (say with a laptop), they have root on the laptop, they can simply su to the userid they want to mount the home dir of. Appletalk trusts the user. It mounts the users home dir if, and only if, that user authenticates to the server correctly... regardless of the machine and its location.
I like NFS. It is really easy to set up and, for me, has been extremely reliable. However it is very difficult to make it even a little bit secure.
Even better is AFS (Andrew File System) which handles security and laptops and is far more robust than either Appletalk or NFS both in reliability and security.
See: http://www.openafs.org
The downside is that it is NOT simple to set up... once it is setup it is easy to administer but the initial setup is pretty complicated and takes some serious planning.
Even though he is setting up a simple home network I don't think it is a good idea to encourage anyone to use unsafe practices.
|
-DU-...etc...
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Dec 2002
Location: Newport Beach, CA
Status:
Offline
|
|
Even better is AFS (Andrew File System) ...
Interesting thing is, when I select "Go/Connect To Server" on the Mac, the ip for my Linux box is already filled in the dialog, with afs in front of it. Like this:
afs://xxx.xxx.x.xxx
(I think it's like that, I'm not infront of the machine right now)
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Nov 2002
Location: Rouge River
Status:
Offline
|
|
Originally posted by EnVoy:
Yes... I think so...
Situation:
When sitting at my Linux box, my normal everyday login is as user B. When I Netatalk from my Mac OSX box to the Linux box I login as my mac name (lets say "C"). So I copy a file from the Mac to my user C (lets say user C's "Documents" folder) on the Linux Box. Then, sitting infront of the Linux box again, I try to copy the file from user C's documents folder to, lets say. the Desktop (which would be user B's desktop folder). Doesn't allow me. I know it's a permissions thing, but it is a pain to have to log-out from user B and log-back in as user C, then change the permissions on the file, then log back in as user B.
Actually, you can accomplish this using the 'sudo' command. You (while logged in as user B), type 'sudo -u userC cp fileyouwant newlocation'. That way, the copy command will be executed as though you were userC rather an root.
I have enabled "Allow users to share directories". I would like to just be able to copy a file over, then put it anywhere I want. I know this is all because of security, but I am the only one using the machines.
What would you suggest is the easiest way to set this up? Just use user "B" when mounting the Linux on the Mac?
Why not make sure that users B and C are in the same group, and then give the group read and write permissions for each others' files?
|
Swimming upstream since 1994.
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2000
Status:
Offline
|
|
Originally posted by EnVoy:
afs://xxx.xxx.x.xxx
It remembers the last AFP server you connected to. It probably looks like this:
afp://xxx.xxx.x.xxx
AFS is a different beast entirely. You wouldn't be connecting to it through the Connect to Server panel.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Dec 2002
Location: Newport Beach, CA
Status:
Offline
|
|
It remembers the last AFP server you connected to. It probably looks like this:
afp://xxx.xxx.x.xxx
AFS is a different beast entirely. You wouldn't be connecting to it through the Connect to Server panel.
Oh, right, maybe it was afp!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|