Accessing server in order to modify website, please help!

Hi,

I am relatively new to Linux and Opensuse and I have a real newbie question to ask (so feel free to make fun :)), but I am getting kind of desperate to figure this out, and searching various forums and google has not yet yielded what I need.

The background:

A while ago I was saddled with the job of maintaining my department’s website (I work at a college). When I still used windows I would access my department’s folder on the web server using the following procedure: (in windows XP) go to the start menu > click ‘run’ > enter the folder address, I would be prompted for my login and password. The folder, and the whole server in fact, would then be visible in the windows file browser, under the ‘networks’ icon. I could then navigate to my department’s folder and modify the files I need to to update the website.

My question:

How do I do this in Opensuse (using Gnome). I tried going to ‘network’ in nautilus and then ‘open location’ but no luck. I also tried ‘connect to server’ in nautilus (in the ‘file’ menu), but again no luck. I also asked the IT guys at my college, but they have no idea about Linux and their answer basically amounted to ‘use windows’ - which I could stomach if my college provided reliable access to computers on campus, but they don’t so I have to use my laptop, which is now windows free :). My current job is only going to last for a few more months, so having only so recently got rid of windows I am reluctant to re-install it just for this purpose (which is just about the only reason I currently have for using windows - the other is being able to download audiobooks from the public library, but that’s another matter).

I know this is a really dumb question, but I have not been able to find any instructions about this, so any pointers or advice or instructions would be immensely appreciated.

Hi
Sounds like it’s probably running samba, I would suggest installing nmap and running a scan on the machine to see what ports are open. Else use windows share for the ‘server type’ to connect to and see if that works.

Thank you very much for the quick reply.

I tried the ‘windows share’ option, but got a message that said something like ‘cannot find folder list’ (I do not recall exactly, the college won’t let me have remote access so I have to be on campus to do all this, and it has a been a few days since I was there).

I’ll try using nmap next time I’m on campus and see what it yields.

Thanks again.

What exactly was the address that you used to type into the “run” slot on the windows box to access the files on the web server?

It is ‘Hcc_www02’ - there may have been some slashes in there also, i.e. ‘//Hcc_www02/’. I apologize for my bad memory, it has been a while since I had to type it in since windows remembered it for me.

Sounds like Samba as Malcolm suggested. Here are some checks of your Samba setup:

  1. Check in the firewall that Samba is allowed. GoTo Yast → Security and Users → Firewall → Allowed Services and make sure you allow Samba Server and Netbios Server and Samba Client as per this link.

  2. Check that you have set Samba to On. Run this command in a terminal window:

sudo /usr/sbin/rcnmb status; sudo /usr/sbin/rcsmb status

You should get mention of the SMB daemon and that it is “running” and of the NMB daemon and that it is “running”.

  1. Have a look at the workgroup name with this command run in a console window:
testparm -s -v | grep workgroup

This will return a list of lines the last of them names the workgroup. Go to the windows machine/s at work and check that your workgroup name is exactly the same. If it’s different, then change the workgroup name on the Linux box to be the same as the name at work.

OK how did all of that go?

And for completeness you could run this command to reveal the Samba config file and post the results back here:

cat /etc/samba/smb.conf

And I suppose this too: ask the admins at work if you’re running a workgroup or a domain networking setup for linking to the web server – and is the web server a Linux Apache server or what?

Thank you very much for the detailed answer. I have not had a chance to try this out yet, but I will when I get to campus tomorrow, and report back. Thanks again!

My apologies for taking so long to post back. I followed the steps you outlined. Here is the samba config file.


# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2011-01-30
[global]
    workgroup = WORKGROUP
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    usershare allow guests = Yes
    add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
    domain logons = Yes
    domain master = Yes
    local master = Yes
    os level = 65
    preferred master = Yes
    security = user
    wins support = No
[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes
[profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700
[users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/
[groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes
[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775

[netlogon]
    comment = Network Logon Service
    path = /var/lib/samba/netlogon
    write list = root


After all this I tried ‘connect to server’ from the nautilus ‘file’ menu, using the ‘windows share option’ and got this error message:


Error: Failed to mount Windows share
Please select another viewer and try again

I also borrowed my girlfriend’s laptop, which has windows vista on it and found that I could not connect to the server using windows either. I got a message saying that windows could find the server but that it was not responding at this time, and that I should ask the administrator open port 445 in their firewall. Alas the guy I needed to speak to about this has not been around!

I googled the error message above and it seemed quite common in connection with samba and windows shares (at least a few years ago), but I did not find any posts about a solution. Given the windows error message I would not be surprised if there really is something going on on their end (when I was first assigned this task I had problems accessing the server, when I visited the IT office to try sort it out they gave me the run around for a few days before they checked to find that they had not actually given me permission to access the relevant folder!)

If you open the firewall as I suggested, then 445 is set correctly on your computer. I can’t say whether it’s set correctly on the server at your work, but it seems to me that the server has been working OK there for a long, long time. So you should follow point 1 mentioned above. You don’t have to be at work to set the firewall.

Also, what happened re point 2? You don’t have to be at work to run the commands.

Now, regarding point 3, we now know that you are set up for a workgroup named “WORKGROUP”. But you haven’t told me whether the network at work is set the same – recall that is said this: “Go to the windows machine/s at work and check that your workgroup name is exactly the same. If it’s different, then change the workgroup name on the Linux box to be the same as the name at work.” What happened in relation to that?

Also, ask the admins at work if you’re running a workgroup or a domain networking setup for linking to the web server – and is the web server a Linux Apache server or what?

Finally, I recommend that you change the struture of smb.conf. This portion:

[global]
workgroup = WORKGROUP
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \%L\profiles.msprofile
logon home = \%L%U.9xprofile
logon drive = P:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = Yes
domain master = Yes
local master = Yes
os level = 65
preferred master = Yes
security = user
wins support = No

Should be edited to be this:

[global]
workgroup = WORKGROUP
netbios name = xyzabcdef
name resolve order = bcast host lmhosts wins
passdb backend = tdbsam
server string = “”
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
use client driver = yes
map to guest = Bad User
local master = yes
preferred master = yes
os level = 33
usershare allow guests = Yes
usershare max shares = 100
usershare owner only = False

You should change the xyzabcdef to something that you like. It’s the name that appears alongside the icon for your computer in a network browser.

But the other questions are all important too.

This stuff is discussed in more detail here: Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x

But the important bits for your situation have been extracted and put here. You should address them.

I should add that the reason I suggest those changes for the [global] stanza in smb.conf is that it makes your computer very like your old xp computer setup, perhaps plus a few steroids also, but very xp’ish.

On Fri March 4 2011 10:36 pm, Brouwer2 wrote:

>
> My apologies for taking so long to post back. I followed the steps you
> outlined. Here is the samba config file.
>
>
>
> Code:
> --------------------
>
> # smb.conf is the main Samba configuration file. You find a full commented
> # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
> # samba-doc package is installed.
> # Date: 2011-01-30
> [global]
> workgroup = WORKGROUP
> passdb backend = tdbsam
> printing = cups
> printcap name = cups
> printcap cache time = 750
> cups options = raw
> map to guest = Bad User
> include = /etc/samba/dhcp.conf
> logon path = \%L\profiles.msprofile
> logon home = \%L%U.9xprofile
> logon drive = P:
> usershare allow guests = Yes
> add machine script = /usr/sbin/useradd -c
Machine -d /var/lib/nobody -s /bin/false %m$
> domain logons = Yes
> domain master = Yes
> local master = Yes
> os level = 65
> preferred master = Yes
> security = user
> wins support = No
> [homes]
> comment = Home Directories
> valid users = %S, %D%w%S
> browseable = No
> read only = No
> inherit acls = Yes
> [profiles]
> comment = Network Profiles Service
> path = %H
> read only = No
> store dos attributes = Yes
> create mask = 0600
> directory mask = 0700
> [users]
> comment = All users
> path = /home
> read only = No
> inherit acls = Yes
> veto files = /aquota.user/groups/shares/
> [groups]
> comment = All groups
> path = /home/groups
> read only = No
> inherit acls = Yes
> [printers]
> comment = All Printers
> path = /var/tmp
> printable = Yes
> create mask = 0600
> browseable = No
> [print$]
> comment = Printer Drivers
> path = /var/lib/samba/drivers
> write list = @ntadmin root
> force group = ntadmin
> create mask = 0664
> directory mask = 0775
>
> [netlogon]
> comment = Network Logon Service
> path = /var/lib/samba/netlogon
> write list = root
>
>
> --------------------
> After all this I tried ‘connect to server’ from the nautilus ‘file’
> menu, using the ‘windows share option’ and got this error message:
>
>
> Code:
> --------------------
>
> Error: Failed to mount Windows share
> Please select another viewer and try again
>
> --------------------
> I also borrowed my girlfriend’s laptop, which has windows vista on it
> and found that I could not connect to the server using windows either. I
> got a message saying that windows could find the server but that it was
> not responding at this time, and that I should ask the administrator
> open port 445 in their firewall. Alas the guy I needed to speak to about
> this has not been around!
>
> I googled the error message above and it seemed quite common in
> connection with samba and windows shares (at least a few years ago), but
> I did not find any posts about a solution. Given the windows error
> message I would not be surprised if there really is something going on
> on their end (when I was first assigned this task I had problems
> accessing the server, when I visited the IT office to try sort it out
> they gave me the run around for a few days before they checked to find
> that they had not actually given me permission to access the relevant
> folder!)
>
>
Brouwer2;

You have Samba set to be a Primary Domain Controller(PDC). I would be really
surprised if this is what you want. Try using the smb.conf settings
suggested in Swerdna’s HowTO.

http://opensuse.swerdna.org/suselanprimer.html

It is unlikely that the proper value for the workgroup parameter is
actually “WORKGROUP”. This must match the workgroup/domain name used on the
server. You may need to contact the IT people to get the proper value (or
look at an office machine that can connect.) Samba should be able to use
port 139 ( smb traffic can be on either 445 or 139 and both are tried.) If
you are connecting from a remote location it is possible a Firewall blocks
all smb service to the server.


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Thank you swerdna and venzkep for your continuing help. I have to apologise for my last post, it was the result of a sleep-deprived haze, and I rather ballsed it up.

So to take each item in turn:

  1. I followed the steps from the link posted. The network interfaces are set to ‘external zone’ and samba server, samba client and netbios server are all allowed services.

  2. Both smb and nmb deamons are running.

  3. The search for the workgroup name, alas, did not go so well as I don’t have access to any computer at work, other than my own laptop. (I could bore you with the explanation as to why this is the case, and I would be happy to if you ask, but I’ll abbreviate by saying just that I work for a New York City public institution, where a lack of resources, and a lot else besides, is the norm.)

I made a couple of (I hope) educated guesses (based on memories of prior log in attempts) but I guess they did not work. With luck sometime in the next week I will be able sneak into a computer lab or be allowed to speak to someone in IT who can answer this question.

With regards to the smb.conf file, I screwed this up: I posted the wrong file. My girlfriend’s (windows having) computer also has opensuse on it, and all the configuring I did happened on that, but dumbass that I am I posted the smb.conf file from my own laptop. I am sorry about that. For what it’s worth here’s the ‘real’ thing, without the suggested restructuring:



[global]
        workgroup = WORKGROUP
        passdb backend = tdbsam
        printing = cups
        printcap name = cups
        printcap cache time = 750
        cups options = raw
        map to guest = Bad User
        include = /etc/samba/dhcp.conf
        logon path = \\%L\profiles\.msprofile
        logon home = \\%L\%U\.9xprofile
        logon drive = P:
        usershare allow guests = Yes
        add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody
-s /bin/false %m$
        domain logons = Yes
        domain master = Yes
        local master = Yes
        os level = 65
        preferred master = Yes
        security = user
        wins support = No
        ldap suffix =
        wins server =
[homes]
        comment = Home Directories
        valid users = %S, %D%w%S
        browseable = No
        read only = No
        inherit acls = Yes
[profiles]
        comment = Network Profiles Service
        path = %H
        read only = No
        store dos attributes = Yes
        create mask = 0600
        directory mask = 0700
[users]
        comment = All users
        path = /home
        read only = No
        inherit acls = Yes
        veto files = /aquota.user/groups/shares/
[groups]
        comment = All groups
        path = /home/groups
        read only = No
        inherit acls = Yes
[printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No
[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @ntadmin root
        force group = ntadmin
        create mask = 0664
        directory mask = 0775

[netlogon]
        comment = Network Logon Service
        path = /var/lib/samba/netlogon
        write list = root


I’ve now made the changes to the smb.conf file (on all concerned computers).

I’ll make a point of trying to get access to a computer at work, or buttonholing an IT person, to find out about the workgroup/domain name (and maybe finding out if their settings need adjusting).

Thanks again both of you for your help, I really appreciate it.

If you have two or more Linux machines running at home with that same setup for smb.conf: in the Girlfriend’s computer make these lines a bit different from your settings, like so:

os level = 33
preferred master = auto

[if they both have the same “authority” they will argue, just like ppl]

You should get the domain/workgroup name/s by running this console command:

smbtree -D -N

and if that doesn’t work try this:

smbtree -D -N -b

Before you run the command/s, let your laptop boot up, wait for the laptop networking to come to life (e.g. Firefox browser is working, etc), then reboot it and let it come to life again, then run the command/s.

On Sun March 6 2011 12:36 pm, Brouwer2 wrote:

>
> Thank you swerdna and venzkep for your continuing help. I have to
> apologise for my last post, it was the result of a sleep-deprived haze,
> and I rather ballsed it up.
>
<snip>

>
> I’ll make a point of trying to get access to a computer at work, or
> buttonholing an IT person, to find out about the workgroup/domain name
> (and maybe finding out if their settings need adjusting).
>
> Thanks again both of you for your help, I really appreciate it.
>
Brouwer2;

When you talk to the IT person you might want to check on the environment to
which you are trying to connect. If this is a Windows Active Directory
(AD), it is possible you will need to join your computer to the ADS. In
which case the smb.conf suggested by myself and Swerdna will not work. You
will need to install and configure krb5 (MIT kerberos5) and you will need the
realm of the ADS.
There are YaST modules for the Kerberos client and for joining your machine to
the ADS. I’ve not used this, so I’m not sure if you will need to fine tune
your smb.conf or if YaST will do this for you.

To join an ADS your smb.conf must contain:


realm = <your.kerberos.realm>
security = ADS

If it is not an AD then the smb.conf, fine tuned for the workgroup, that was
given you by Swerdna should work.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

It worked!:slight_smile:

Thank you so much for all your help, you guys rock!

It turns out not all problems were on my end. The webserver is now only accessible over a secure wireless connection set up over the christmas break, rather than over the unsecured network I used to use. Once connected to the new network, everything was plain sailing.

Thanks again!

On Mon March 7 2011 10:06 pm, Brouwer2 wrote:

>
> It worked!:slight_smile:
>
> Thank you so much for all your help, you guys rock!
>
> It turns out not all problems were on my end. The webserver is now only
> accessible over a secure wireless connection set up over the christmas
> break, rather than over the unsecured network I used to use. Once
> connected to the new network, everything was plain sailing.
>
> Thanks again!
>
Brouwer2;

Glad you have it working. Congratulations!


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Good to know.