Linux help with ubuntu and samba

Discussion in 'Tech Support' started by null_x86, 6 Mar 2009.

  1. null_x86

    null_x86 Thread Closer

    Joined:
    18 Jan 2009
    Posts:
    2,441
    Likes Received:
    89
    Hey i just set up my HTPC/Media Server with Ubuntu and set up Samba and OpenSSH and I have the shares set up and working and everything is working server-side along with windows-side, but if i try to connect to one of my shares from another ubuntu computer, i cant get into the share. Any solutions? I have tried googling and nothing has worked yet. Like i said server is working along with Winblows, but Linux wont let me into it for some reason... TIA!
     
  2. steveo_mcg

    steveo_mcg What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    5,841
    Likes Received:
    80
    It might be better using NFS for the Linux shares, i know its another layer of admin but i find the nfs performance a little better than samba.

    I had problems getting my linux boxes to connect at first and I can't for the life of me remember what the issue was. I think it was to do with anonymous log ins and the linux box didn't like it so i had to set it to use a specific user and password and just store the password on the windows machines to save having to type it in.
     
  3. null_x86

    null_x86 Thread Closer

    Joined:
    18 Jan 2009
    Posts:
    2,441
    Likes Received:
    89
    isnt NFS non-compatible with NTFS?? Read that on multiple google sources... So far all my samba stuff is working... file transfers are great, streaming video via VLC is amazing and Transmission running in the background via WebUI and its still got power. I really like how its setup, but i really dont want to go thru the hassle of redoing it... I tried a program built into my distro (Ubuntu 8.10 Intrepid Ibex) called pyNeighborhood... its a redo of LinNeighborhood, if I am correct. I have no clue what to do with it :p any tips?
     
  4. steveo_mcg

    steveo_mcg What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    5,841
    Likes Received:
    80
    You've got your server running NTFS as its base FS? NFS is (generally) incompatible with MS what i'm suggesting is running your inter linux shares via NFS and only using Sambas for where your network has to run with windows.

    As for the GUI programmes i could never get it to work how i liked, though that was several years ago and on Debian not Ubuntu. But i ended up knee deep in config files, the Samba config is quite complex but its fairly well documented.
     
  5. null_x86

    null_x86 Thread Closer

    Joined:
    18 Jan 2009
    Posts:
    2,441
    Likes Received:
    89
    no, my server's base and all around FS is Ext3 Journaled. Honestly, all the computers in my house (there are 5, 4 operational, 2 are running linux/ubuntu, the other windows vista/xp) are windows. Im the only one in the house who is "computer savvy" and linux savvy, i guess you could say. My moms computer is going to have the shares linked in Network Places, so she can watch movies, listen to music, back up important docs without having to come get me every two seconds... (our backup media, a 120GB WD drive is failing on us, and we cant risk data loss) so the server was put up tonight and is running. Have to say its running quite well. Havent had a problem accessing it via windows at all. I can access it via my XP P4 Machine and my personal laptop with a modded version of vista. I already have my laptop and the XP machine linked to the shares (docs, pics, music, vids, programs, etc. You get the idea.) and the shortcuts are working... Is it possible to incorporate NFS for the same shares but for the linux machines? Currently I have the only "Desktop" linux machine, and im about to redo it with Win7Beta/Ubuntu, so if nothing else, i can get in via SMB thru Win...
     
  6. steveo_mcg

    steveo_mcg What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    5,841
    Likes Received:
    80
    Yup you can share directories via both samba and NFS. The advantage of NFS is that it mounts just like any other drive to any directory on your FS and is well integrated into the Kernel.


    Have a look through this thread it seems quite comprehensive. http://ubuntuforums.org/showthread.php?t=249889
     
  7. null_x86

    null_x86 Thread Closer

    Joined:
    18 Jan 2009
    Posts:
    2,441
    Likes Received:
    89
    alrighty, well as long as it will play nice with Samba and allow Winblows to the shares and have access to them as well, I will definitely give it a go. But that will be later, i stayed up a few hours too late working on Samba, getting it set up. had to do some manual stuff, and being a bit of a newb to linux, it was frustrating but a definite learning experience. So far though, so good. Only thing im having a bit of trouble with, other than linux not getting access to Samba shares, is doing Remote Desktop. Remote Desktop doesnt want to work, but remote console works perfectly (im using PuTTY via Vista)... The comp is still headed so ill go out in a little and go work on it, but for now its a movie and sleep :p
     
  8. steveo_mcg

    steveo_mcg What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    5,841
    Likes Received:
    80
    Once you get the hang of things PuTTY is really all you'll need to administer the server, plus once the cli clicks you'll be able to do jobs quicker, save all that memory and cpu time wasted by the unused Xserver and you get more options like getting remote access to your server from the office or other random things.
     
  9. null_x86

    null_x86 Thread Closer

    Joined:
    18 Jan 2009
    Posts:
    2,441
    Likes Received:
    89
    yeah... well i cant behead it because its acting as both HTPC and server, thanks to one of my PCs being outdated and me with the no-money-flu... so its working and on 24/7 now, but headed... works though. And PuTTY isnt all that hard to work. Its basically a remote Konsole/Terminal window... And now that I am starting to understand Linux Terminal Code, its getting easier... trust me though, as soon as I can switch computers and make a headless server, it will be that way, and for a long time or until something goes wrong. I think next time I might use 8.04LTS though, instead of 8.10...:rock:
     
  10. steveo_mcg

    steveo_mcg What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    5,841
    Likes Received:
    80
    If your thinking LTS you need Debian, my current server has been running Debian Stable (etch, ok Old stable) for over 2 years with only security updates, completely stable only time it gets spun down is when the house is empty for extended periods. Tbh for a home server your could use debian testing after it beds down a bit and get similar results.
     
  11. OleJ

    OleJ Me!

    Joined:
    1 Jul 2007
    Posts:
    2,024
    Likes Received:
    10
    Which is correct.
    The "problem" is that Linux honors users and permissions set in the samba config :D
    IIRC you can solve it two ways. Either by using steveos method (which I'd suggest as I recall it to be the way I solved it last time) or you could fix it via the samba config but I'm not a whole 100% sure on this.

    Cheers
     
  12. notatoad

    notatoad pretty fing wonderful

    Joined:
    25 Jun 2004
    Posts:
    3,213
    Likes Received:
    60
    Code:
    [global]
    security=share
    
    [shared folder name]
    path=/path/to/folder
    public=yes
    writable=yes
    
    in your /etc/samba/smb.conf should give you a samba share that is read/writable by both ubuntu and windows. but on my system, writing ubuntu->samba is about a bajillion times slower than writing ubuntu->nfs.
     
  13. null_x86

    null_x86 Thread Closer

    Joined:
    18 Jan 2009
    Posts:
    2,441
    Likes Received:
    89
    yeah i tried writing the samba share conf and that was a bit of a pain. Any tips on NFS? I havent found any good guides on it...
     
  14. notatoad

    notatoad pretty fing wonderful

    Joined:
    25 Jun 2004
    Posts:
    3,213
    Likes Received:
    60
    sudo apt-get install nfs if you haven't already and install portmap on the server, then edit /etc/exports on the server
    Code:
    /path/to/folder 192.168.0.0/16(rw,no_subtree_check,root_squash,all_squash)
    
    192.168.0.0/16 shares the folder with all IPs in 192.168.*.*
    rw=read and write
    no_subtree_check=not sure, but it supposedly speeds things up
    root_squash=when a file is written as root by the client the server change the owner to null
    all_squash=strip all ownership

    and then /etc/fstab on the client
    Code:
    (ip of server):/full/path/on/server    /mount/point/on/local   nfs   user   0 0
     
  15. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    NFS is dead easy, but so is Samba...

    If it's working on a Windows station, you aren't doing it right on the other Linux one. Have you installed Samba (or CIFS) on the station? Are you passing the right parameters (username & password)? Are you accessing the server the right way (Forward instead of backwards slashes)?
     
  16. null_x86

    null_x86 Thread Closer

    Joined:
    18 Jan 2009
    Posts:
    2,441
    Likes Received:
    89
    yeah, Samba(CIFS) was working on the Windows Boxes, the linux boxes wouldnt see them until Boxee was installed, then it saw them fine, until it went to sleep or went into screensaver, then it messed up. Ironiclly, the shares messed up for some reason. I was downloading some torrents and they werent movable (even though I had full permissions on the share). So any tips?
     
  17. null_x86

    null_x86 Thread Closer

    Joined:
    18 Jan 2009
    Posts:
    2,441
    Likes Received:
    89
    ok, i redid my server, updated everything in Ubuntu, and got all the stuff set up. I used a GUI this time rather than doing command line (yes im lazy) input, but the shares wont show at all now. The box isnt showing at all in Vista/XP under network, and Ubuntu wont see the Windows boxes from network either. Transmission is accessable remotely thru WebUI. The GUI I used is GADMIN - SAMBA, I got the whole set for my linux box (FTP, rsync, DNS, DHP, etc) and have only tried using the Samba GUI. Everything looks ok, but it wont let me even see the box, let alone the shares. So what do I do?
     
  18. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    You have restarted Samba after you changed the config right?
     
  19. null_x86

    null_x86 Thread Closer

    Joined:
    18 Jan 2009
    Posts:
    2,441
    Likes Received:
    89
    yep. ive restarted the samba service, and even tried restarting the computer. im getting kinda peeved now, cause nothing is working as far as samba goes...

    maybe this will help a little, this is my conf thru GADMIN-SAMBA (GUI tool for Samba)
    Code:
    [global]
    ;	netbios name = homeserver
    	server string = Home Network Samba File and Print Server
    	workgroup = workgroup
    	security = user
    	hosts allow = 127. 192.168.0.
    	interfaces = 127.0.0.1/8 192.168.0.0/24
    	bind interfaces only = yes
    	remote announce = 192.168.0.255
    	remote browse sync = 192.168.0.255
    	printcap name = cups
    ;	load printers = yes
    	cups options = raw
    ;	printing = cups
    ;	guest account = nobody
    	log file = /var/log/samba/samba.log
    	max log size = 1000
    ;	null passwords = no
    	username level = 6
    	password level = 6
    ;	encrypt passwords = yes
    	unix password sync = yes
    	socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    	local master = no
    	domain master = no
    ;	preferred master = no
    ;	domain logons = no
    	os level = 33
    	logon drive = m:
    	logon home = \\%L\homes\%u
    	logon path = \\%L\profiles\%u
    	logon script = %G.bat
    ;	time server = no
    	name resolve order = wins lmhosts bcast
    ;	wins support = no
    ;	wins proxy = no
    	dns proxy = no
    	preserve case = no
    	client use spnego = no
    	client signing = no
    	client schannel = no
    ;	server signing = no
    	server schannel = no
    ;	nt pipe support = yes
    ;	nt status support = yes
    	allow trusted domains = no
    	obey pam restrictions = yes
    #	enable spoolss = yes
    ;	client plaintext auth = no
    ;	disable netbios = no
    	follow symlinks = no
    	update encrypted = yes
    ;	pam password change = no
    	passwd chat timeout = 120
    ;	hostname lookups = no
    	username map = /etc/samba/smbusers
    ;	smb passwd file = /etc/samba/smbpasswd
    	passwd program = /usr/bin/passwd '%u'
    	passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
    	add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
    	add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
    	add group script = /usr/sbin/groupadd '%g'
    	delete user script = /usr/sbin/userdel '%u'
    	delete user from group script = /usr/sbin/userdel '%u' '%g'
    	delete group script = /usr/sbin/groupdel '%g'
    	add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
    	machine password timeout = 120
    	idmap uid = 16777216-33554431
    	idmap gid = 16777216-33554431
    	template shell = /dev/null
    	winbind use default domain = yes
    	winbind separator = @
    	winbind cache time = 360
    	winbind trusted domains only = yes
    	winbind nested groups = no
    	winbind nss info = no
    ;	winbind refresh tickets = no
    ;	winbind offline logon = no
    ;	guest ok = no
    
    [homes]
    	comment = Home Directories
    	path = /home
    	read only = no
    ;	available = yes
    ;	browseable = yes
    ;	guest ok = no
    ;	printable = no
    	share modes = no
    	locking = no
    
    [netlogon]
    	comment = Network Logon Service
    	path = /home/netlogon
    	read only = no
    ;	available = yes
    ;	browseable = yes
    ;	guest ok = no
    ;	printable = no
    	share modes = no
    	locking = no
    
    [profiles]
    	comment = User Profiles
    	path = /var/samba/profiles
    	read only = no
    ;	available = yes
    	browseable = no
    ;	guest ok = no
    ;	printable = no
    	locking = no
    	create mode = 0600
    	directory mask = 0700
    
    [printers]
    	comment = All Printers
    	path = /var/spool/samba
    ;	browseable = yes
    ;	writable = No
    ;	guest ok = no
    	printable = yes
    	share modes = no
    	locking = no
    
    [pdf-documents]
    	path = /home/pdf-documents
    	comment = Converted PDF Documents
    ;	available = yes
    ;	browseable = yes
    	writeable = yes
    	guest ok = yes
    
    [pdf-printer]
    	path = /tmp
    	comment = PDF Printer Service
    	printable = yes
    	guest ok = yes
    	use client driver = yes
    	printing = bsd
    	print command = /usr/bin/gadmin-samba-pdf %s %u
    	lpq command = 
    	lprm command = 
    
    [Jake]
    	path = /home/Jake
    	comment = Jakes Files
    	valid users = jake
    	write list = jake
    	admin users = jake
    	writeable = yes
    	available = yes
    	browseable = yes
    	printable = yes
    	share modes = no
    	locking = no
    
    [Videos]
    	path = /home/homeserver/Videos
    	comment = Videos
    	valid users = homeserver, jake, mom, root
    	write list = jake mom
    	admin users = jake mom
    	writeable = yes
    	available = yes
    	browseable = yes
    	printable = no
    	share modes = no
    	locking = no
    
    hopefully this will help somewhat... ive started a fourm at Ubuntu fourms as well, just to get some help from their end... but basically im trying to get multiple shares with different users
    you can see it in te above conf, i have a folder for me, a folder for mom, and so far videos, and then the users associated with those shares... hopefully im not making a bad mistake with the conf... TIA!
     
  20. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
     

Share This Page