Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am currently attempting to network my windows XP and linux (Mandrake 10.2 Le2005) systems together. I have managed to get the machines on the windows network to mount using:
mount -t smbfs //omoikane/"phobos (d)" /home/user/Network/omoikane/phobos
where omoikane is the name of the windows system and "phobos (d)" is the share directory that i wish to mount. This command works fine, however i have to re-do this every time i restart mandrake (for all of my drives and partitions from 3 systems...). I am wondering how one can set up linux to auto do this when the system starts. I have tried editing /etc/fstab using
but this does not work (unsure of the exact error - is there a log file kept somewhere that tells me of the errors?)
Having looked over the tutorials on the site and searched on the internet I have been unable to work out why the above command does not work. Also, is there another way of doing it rather than fstab (a script that I can run when the machine starts that opens a command line and logs in a root then runs the first command i mentioned)?
Any help would be appreciated, as this problem is driving me up the wall!
Which command should I add to the rc.local? I tried adding
mount -t smbfs //omoikane/"phobos (d)" /home/user/Network/omoikane/phobos
to the file before, but It had no success.
Originally posted by FlamingBee Which command should I add to the rc.local?
whichever command you already know works fine... adding it to your rc.local would give the same effect as if you had run the command as root after startup... from your first post i would assume the command you want to append to that file is:
Code:
mount -t smbfs //omoikane/"phobos (d)" /home/user/Network/omoikane/phobos
Where
servername = server name of the SMB/Domain server
sharename = shared resource name
/mountpoint = directory you want to mount the filesystem on (example: /mnt/samba)
username = *nix username
domainuser = smb/domain/active directory username
domainpassword = the password in samba/domain/active directory for the domainuser
tried both of those, no success. In /etc/rc.d/rc.local there is:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
#Bring acx100 device up
cd /home/user/acx100-0.2.0pre8_plus_fixes_57/scripts
./start_net
#mount windows filesystem
mount -t smbfs //omoikane/"mars (k)" /home/user/Network/omoikane/mars
mount -t smbfs //omoikane/phobos /home/user/Network/omoikane/phobos
Sorry about the lethargic response, but my NTL BroadBand is broken, so i've had to resort to finding a free 56k provider :/ Anyway, I have tested what you said by adding:
(Note: My windows machine just has the one account, will, and that has no password)
into fstab. When the machine starts up it comes up with an error on the startup screen thing saying something along the lines of "mounting smb filesystem: Connection to omoikane failed" (the error message is slightly longer than that but it passes very quickly and I don't know where the log of the initialisation is stored).
When I click on "Computer" on my desktop, i can see my floppy drives, cdrom drive, phobos, filesystem, network. Phobos is the one i'm interested (that is the network drive). When i click on it I get the error message:
Mount Error
mount: Only root can mount //omoikane/phobos on /phobos
I hope this is enough info for you. Thanks for the patience and support thus far guys.
Can you access the share from another Windows computer? I thought Windows wouldn't let you access shares if you don't have a password...
Is your Linux account named 'user', group 'user'?
Quote:
mount: Only root can mount //omoikane/phobos on /phobos
You could add 'user' to the mount options to allow anyone to mount the share. Note that user implies nosuid, noexec and nodev
Yes, the share is accessible from all other windows machines on the network. And my Linux account is named 'user', but I don't remember ever having put a group in... How would I find out what my group is?
Added user to the options, and now I get different error messages. I get either:
Cannot mount on /phobos: Operation not Permitted
smbmnt failed: 1
or, using the other entry in fstab,
SMB Connection failed.
Hope we can resolve this issue soon, it's driving me up the wall.
Yes, the share is accessible from all other windows machines on the network. And my Linux account is named 'user', but I don't remember ever having put a group in... How would I find out what my group is?
use the id command, and look for gid= in the output
Quote:
Added user to the options, and now I get different error messages. I get either:
Cannot mount on /phobos: Operation not Permitted
smbmnt failed: 1
does /phobos exist? can you write to it? Try mounting the filesystem as root to see if that works.
Quote:
Btw, what are nosuid,noexec and nodev.
nosuid: the suid bit on executables will not be honored
noexec: no file will be executed from this mount
nodev: no device file on this mount will work
These are used to prevent malicious users from mounting filesystems with malicious things on them (like suid shells, exploit code, world-writable block devices, etc.)
A user could create a floppy at home and put a suid shell on it. He could then mount the floppy on a work computer to get root access. This is why the work computer must refuse to honor the suid bit.
Right, using "id" i've found my uid=user and gid=user. /phobos definately exists, I can write to it, and i can mount the netwrok drive to it from console by (as root) using:
mount -t smbfs //windowspc/share /mount
where the name of the windowsPC is omoikane and the share is phobos, and it is being mounted to /phobos
On starting up the machine, if I press "esc" i can see a verbose version of the startup. In this i can see when it trys to mount the networked drive using samba, but it comes up with the error message:
When I click on the "Computer" icon on the desktop, then double click on the "phobos" filesystem icon I still get the error message:
Cannot mount on /phobos: Operation not Permitted
smbmnt failed: 1
I have no idea why it does this. Is there a way I can make a custom-scrip that opens a command line, logs in as root, executes the commands and then closes when I run it? (asking me for the root password, obviously). This way i just run this when the machine has started up, and i can then use the network drives.
Thanks for the help this far, and for being so patient with me, it's much appreciated.
Is there a way I can make a custom-scrip that opens a command line, logs in as root, executes the commands and then closes when I run it? (asking me for the root password, obviously). This way i just run this when the machine has started up, and i can then use the network drives.
If it won't work otherwise... You should create a desktop link to the command: use gskuexec (gnome) or, for kde: right-click on the desktop>new>link>to application>Application>advanced>Run as:root and, for the command write 'mount -t smbfs //windowspc/share /mount' or 'mount /phobos'
Well, i'm fairly certain that adding entries into fstab won't work (looking over my system, i think the reason is that my wireless network card doesn't startup until after everything else, so fstab cannot connect properly). As for creating this link, how do I do it? I am using Mandrake 10.2 with Gnome desktop. Having searched for gskuexec on the internet, and typing it in command terminal, I have found nothing on it. If you could please guide me through the process of creating this link it would be much appreciated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.