LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Win95 and Samba (https://www.linuxquestions.org/questions/linux-networking-3/win95-and-samba-23304/)

Half_Elf 06-13-2002 01:19 AM

Win95 and Samba
 
I have installed Samba and everything seem to be working fine if I want to access my Win95 computer shared files. (btw anyone know a GUI for Samba?) But If I want to acces shared files here on my linux computer (with my win95 computer) a window saying something like : you want to access //ELF/IPC$ please enter your password

What is this? What is IPC$ and what's this password (the only files I'm sharing are "guest access" without password... well I think)

Noerr 06-13-2002 02:04 AM

gui for samba=swat
you need to create user with samba which has same username/password than UR win95
use this
smbpasswd -a YourName

Half_Elf 06-13-2002 11:25 AM

Ok... Can't I share my files to "any user" without any password?

Half_Elf 06-13-2002 02:26 PM

Herm If I share a folder (example:/home/bill) can I deny user in my network to access other folders in this shared folder? (ex: /home/bill/Desktop)

sewer_monkey 06-13-2002 05:09 PM

What do you want?
 
Half_Elf, what exactly are you trying to accomplish? What do you want out of SAMBA? Maybe there's an easier way than what you currently have set up...

Do you want people to be able to log on to the Windoze workstation and have their username/password validated on the SAMBA server? Do you want each Linux user to have their own private share and a publicly accessible one at the same time? Just tell me what exactly you need and I'll do my best to help you...

For example, at home I run a SAMBA PDC server, each member of my family has a username and a password. When they log on to the Windoze workstation(s), their start menus, registry settings and desktops get updated to their personal preferences, and they also get three shares mounted at login time: drive L: (their private disk space), drive W: (their public_html, an easy way to publish personal web pages), and drive P: (a place where all of them have write access and can share files among each other).

The only thing that I have no experience in is printing, because I don't have a printer. :(

Noerr 06-13-2002 06:35 PM

btw, you can't have share open and folders underneath locked with password prompt
not possible in samba, not possible in windoze

sewer_monkey 06-13-2002 06:54 PM

Quote:

Originally posted by Noerr
btw, you can't have share open and folders underneath locked with password prompt
not possible in samba, not possible in windoze

Well, unless different users and groups are used to set the UNIX permissions accordingly...

Half_Elf 06-13-2002 08:30 PM

I want to learn Sewer_Monkey!!!

I want my old crappy win95 computer to be able to access some files and folders in my linux box... Some folders must be protected by a password,some must be accessible to everyone.
I also want some users to have the same "disk name" (like your L: ) but without sharing the same content (if you understand what I mean...)

Can I share files to "any" users, not only users registered on my box?


Oh and I want to access files shared on my Win computer with my Linux Box, but with a GUI if possible :D

sewer_monkey 06-14-2002 10:08 AM

That's the spirit! ;)

OK, first off, take a peek at my smb.conf (a bit stripped down for simplicity's sake):
Code:

[global]
        smb passwd file = /etc/samba/smbpasswd
        auto services = global public cdrom
        dns proxy = no
        socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
        printcap name = /etc/printcap
        wins support = true

# PDC stuff
        preferred master = yes
        domain master = yes
        local master = yes
        # This setting should pretty much nail down any opponents
        # in the browser elections.
        os level = 64
        security = user
        encrypt passwords = yes
        domain logons = yes
        # For some reason H: shows up only on NT/Y2K/XP
        # clients... Need to investigate further!
        logon drive = H:
        # This one is for the Win9X/ME roaming profiles
        logon home = \\einstein\profiles
        # This one is for WinNT/2000/XP roaming profiles
        logon path = \\einstein\profiles
        # This name has to be relative to the [netlogon] share
        logon script = %U.bat
        # Windoze XP/Y2K support?!?! Not recognized by SAMBA...
        # Got this from some idiot's web page...
        #use spnego = false
        # Since we're running a PDC, in this case, the workgroup
        # name is really the NT domain name...
        workgroup = HOME_NET
# End PDC stuff, also see PDC shares...

        server string = HomeNet Samba Server
        netbios name = EINSTEIN
        log file = /var/log/samba/%m.log
        load printers = yes
        username map = /etc/samba/user.map
        # Any Joe should be able to access this sucker...
        default = public

[homes]
        path = /home/%U/pc
        writable = yes
        browseable = no
        create mode = 0664
        directory mode = 0775
        preserve case = yes
        # I don't like this... It's confusing to use the service name
        # (which in this case coincides with the user name). This
        # was in the default SAMBA config file...
        #valid users = %S
        # I prefer this instead:
        valid users = %U
        comment = Home Directories
        # If set to "yes" this screws over things pretty badly...
        case sensitive = no

[web]
        path = /home/%U/public_html
        writable = yes
        browseable = no
        create mode = 0755
        directory mode = 0775
        preserve case = yes
        valid users = %U
        comment = Web Space
        # If set to "yes" this screws over things pretty badly...
        case sensitive = no
        # This allows setting the user execute permission for CGI
        map archive = yes
        # This allows setting the group execute permission for CGI
        map system = yes
        # This allows setting the world execute permission for CGI
        map hidden = yes

[public]
        path = /usr/pub/samba
        writable = yes
        create mode = 0664
        directory mode = 0775
        preserve case = yes
        comment = Public Stuff
        printable = no
        invalid users = root
        public = yes
        # If set to "yes" this screws over things pretty badly...
        case sensitive = no
        guest ok = yes
        # Do NOT let anyone put set executable permission bits!
        map archive = no
        map system = no
        map hidden = no

# Start PDC shares
[netlogon]
        path = /etc/samba/netlogon
        writeable = no
        write list = admin

[profiles]
        path = /home/%U/NTProfile
        writeable = yes
        create mask = 0600
        directory mask = 0700
        valid users = %U
# End PDC shares

Now, I don't want you to just copy paste this file into your smb.conf, use it wisely. What I would suggest you do, is research each and every directive you don't understand fully or aren't sure about here. Also check out the SAMBA HOWTO Collection, available in HTML and PDF formats (this one's worth printing). I used just these two documents to set up my home network.

If you have any specifric questions, feel free to ask. I know you may have some, since the whole Windoze NT PDC scheme is pretty confusing... Machine accounts, user accounts... Go figure! ;) Also note, that you'll need a basic understanding of some SAMBA parameters before proceeding any further in this message. :)

With regards to having freely-accessible shares (with no passwords), you can make a guest account (say, username "guest" and password "guest"), because SAMBA needs to work with a UNIX UID for any share. SAMBA needs a username for accessing any share it serves. Alternatively, you can make a guest share (see the man page for smb.conf), but you'll still have to tell SAMBA to use a UNIX username as the guest account (in the manpage they use the "ftp" account, but I prefer creating a separate account for SAMBA guests, or just use the username "nobody").

Now for password-level access (password-protected shares). Unfortunately you can't really do this nicely on SAMBA... Here's a quote from the smb.conf manpage:
Quote:

Note that smbd ALWAYS uses a valid UNIX user to act on behalf of the client, even in security = share level security.
This is not very surprising, since SAMBA has to work on UNIX-type OSs, where password-protected shares are just not needed... UNIX is a multiuser environment, and as such it focuses on user-level security (in Windoze terms).
What I would suggest is the following alternative (maybe there's a better way, but this is what comes to my mind): create a bogus account on your Linux box for the share, so that anyone can access it, if he/she knows the password for the bogus account. Note that you can have several "bogus" accounts like this in your smbpasswd file, and then you can use the user.map file to map these bogus usernames to actual UNIX usernames, such as "ftp" or "nobody".

Here's what I mean (this is an example just to make it work, with no regards for security, such as create masks, e.t.c.):

First of all, create a bogus username and a password in the /ets/passwd (and set the shell to something like /bin/false) and then in the smbpasswd file:

smbpasswd -a bogususer

Finally, add the needed share to your smb.conf:
Code:

[someshare]
  path = /path/to/some/share
  valid users = bogususer

Restart SAMBA, and you're on! I agree, this is probably not the most elegant way of achieving this... but right now it's the only thing that comes to my mind...

I really suggest you go with the user-level security, though... Windoze 9x is not going to let you connect to anything unless you log on to it anyway...

P.S. Are you a "Lord of the Rings" fan (you know, your username)?

Half_Elf 06-14-2002 01:25 PM

Woooow I think I will need a complete week to really understand all the content of this msg ;)

But thanx very useful, well the part I have understood yet :)

Herm and yes I'm a Lord of The Ring fan but I use this nick since a very long time, not because of the movie :D

sewer_monkey 06-14-2002 07:12 PM

You're welcome. And if you have any specific questions, feel free to ask. :)

Half_Elf 06-14-2002 11:30 PM

I have only one question right now.

I want something having a GUI to access my files on my Win computer... You know, Samba is a text mode program... I really like text mode progz but if I want to get 3 specific files in... I dunno C:/Windows maybe?... well a very full folders, it will be a lot of trouble if I don't have a GUI. Do you know something that I can use in X to do that??

sewer_monkey 06-14-2002 11:46 PM

Yup, I have the same deal set up at home. ;)

What I did was add a line to my /etc/fstab, something like this:

//newton/c /mnt/smb/newton/c smbfs user,_netdev 0 0

Which allows anyone to mount the share to /mnt/smb/newton/c, and once you get it mounted, it's only a matter of getting there with Konqueror, Nautilus, or whatever you want...

Oh yeah, and I think KDE 2.x and above should have a GUI for smbclient built in, but I haven't played around with it... I know the URLs start with smb://... You might want to check this out.

DMR 06-15-2002 03:44 AM

Quote:

Originally posted by Half_Elf
I have only one question right now.

I want something having a GUI to access my files on my Win computer... You know, Samba is a text mode program... I really like text mode progz but if I want to get 3 specific files in... I dunno C:/Windows maybe?... well a very full folders, it will be a lot of trouble if I don't have a GUI. Do you know something that I can use in X to do that??

Half_Elf,
If I understand your question correctly, you want something equivalent to Win 95/98's Network Neighborhood. In other words, something that will allow you to browse remote shares/folders with an "Explorer" kind of GUI presentation, yes? If so, Linneighborhood is what you want. It installs very easily, and is pretty intuitive to use. Once you're sure that your basic Samba/Linux<->Widows setup is functioning correctly, give it a try.

:)

tuantran 06-15-2002 06:58 PM

sewer_monkey,
when you setup smb.conf file, I look at the line
................................................................
domain logons = yes (or domain logon = yes no "S")
.................................................................
It tell me that ALL WINDOWS users must logon to this server (Linux box), isn't it? If YES, DO we need to do anything else with the Linux box or we ONLY need to edit smb.conf file to make it works like domain logon server for WINDOWs users? I have no problem with SAMBA at workgroup mode but don't know how to make it works like domain server. IF you have time, please drop me few lines to help me out. Thank you.


All times are GMT -5. The time now is 03:48 PM.