Web server help

I am relatively new to Linux but have had a KBUNTU install running for the last year as a samba server for my local network. I do a lot of web design and need a web server that can host live websites as well as provide me a local testing server.

I have Apache running on the KBUNTU machine but have never been able to set it up as a true web server. I asked questions, got advice, tried solutions but no good

I need a GUI

I have another computer free and want to try Suse again. I need to replace a Windows 2000 server running IIS and ColdFusion with a Linux machine using PHP/Apache/MySQL. I need to host a live .com site and need the ability to serve local dotted web sites for development purposes. I use a service to host DNS for the live site and it points to my RR ip. I do NOT want to beat my head against the wall trying to edit configuration files, I need a GUI (#1 requirement).

Is there anything in Suse that will work and work reliably?

Scott

First, a warm welcome here.

AFAIK, more than 90% of webservers is a linux server. I have all you want up and running, all can be controlled from the GUI.

Install the LAMP webserver pattern
Install yast2-http-server
Set apache2, mysql to start at boot from Yast - System - Runlevel editor

Restart Yast, you will now have a new entry in Network Services, to configure the webserver.

That’s basically it.

IMHO it make take some time, but you made the right choice by changing. I sometimes have to do things on a windu server, it’s horrible compared to how i can do things on linux/openSUSE.

Please get back here, if you have more questions, or get back with results.

I endorse what Knurpht said. I have a developmemt Apache server running on my desktop and a production server on the net plus one-click ftp in Dolphin for uploads of edited pages. So easy. FFI link.

Thanks for the tips and thanks swerdna for the link to the tutorial. As far as easy I have my doubts. I think I have used that tutorial before and had no luck. The one time I had any luck was when I threw a spare HD in my main computer to try suse 10.2. It all went very well and I had a machine I could manage through a gui but I could never figure out how to serve multiple sites locally and have 2 live sights, I can only assume that was DNS.

When it came time to restore my main computer to normal I couldn’t duplicate suse on another computer. I installed it exactly the same on the new machine but couldn’t get the same setup.

Should I start fresh with 11.2? What are the security risks with suse as a lamp server? I’ve been using 2000 server and IIS for so long now I can’t think of anytime anything has happened (except for that “Code Red” thing that went around in early 2000) but then again would windows have admitted it :wink:

OK here is another one. Currently I have one network card in a 2000 box with IIS. I use an outside service for DNS that depends on a client running on my machine. I have 2 domain names that the service forwards to me. I forward all port 80 to the 2000 box through my router. IIS knows what site to serve to what request. I also set up sub domains for development and restrict access to only my external IP. From within my network I can go to http://subdomain.registeredDomai.xxx and view what I am working on. From outside that address is blocked.

Will I be able to do that? Would I be better off using 2 NIC’s and have the live sites on one and the local network on the other and use the ~'ed usernames locally? If so, do I need DNS installed for the live sites?

Well that was pretty straight forward. I finally have suse 11.2 installed on a computer and apache working. I haven’t tried any php scripts or even looked at mySql yet.

I accepted the kubuntu 10.4 upgrade and now my samba server is kaput! I think I am through with kubuntu as this is the second time this has happened after an upgrade. I really like that suse has administrative tools available and tried setting up samba but I keep getting prompted for username and password from both the networked computers and locally. Is there a how-to on that? I tried sudo’ing the smb.conf file and kwrite crashes. I’m currently doing all the suse patches and when thats finished I’m going to try removing and re-installing kwrite. Kubuntu uses kate as a text editor. Is that available for suse and a better choice?

Thank you in advance for your help…

anybody out there?

I need help getting samba to work…

I found your how to and did the repository thing with no success…

I can’t get it working using the admin tool and I can’t sudo the conf file as I get an error that states:


k2zs@newsushi:~> sudo kwrite /etc/samba/smb.conf
root's password:
kwrite: cannot connect to X server
k2zs@newsushi:~>

I’m in a bind now because my kubuntu samba server is broken due to their upgrade.

I really like that suse has administrative tools available and tried setting up samba but I keep getting prompted for username and password from both the networked computers and locally. Is there a how-to on that?

Did you find swerdn’a excellent tutorial on samba?

Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x

Regarding Samba, what are you trying to achieve on the openSUSE machine? Is it to make a Samba server or a Samba client? And give some more explanatory details of your goal (I’m a bit confused, e.g. what resources are you wishing to share over Samba from openSUSE).

Also, let’s look ata few things re the Samba setup. Can you report back here the results of these command line inquiries:

  • testparm -s
  • cat /etc/samba/smb.conf | grep workgroup
  • sudo /etc/init.d/smb status
  • sudo /etc/init.d/nmb status
  • sudo pdbedit -L
  • cat /etc/sysconfig/SuSEfirewall2 | grep FW_LOAD_MODULES=

Sorry, instead of this:

cat /etc/sysconfig/SuSEfirewall2 | grep FW_LOAD_MODULES=

I meant to say this:

cat /etc/sysconfig/SuSEfirewall2 | egrep "FW_DEV_EXT=|FW_CONFIGURATIONS_EXT="

Thank you all for responding.

My primary goal is to make a general purpose server to replace my failing Compaq Proliant server running windows 2000 server, IIS, and ColdFusion as well as serving up windows clients their shares. Until today I was doing the windows shares on a kubuntu server but the version upgrade I accepted this morning has rendered it usless.

I performed a network install of openSuse 11.2 on a dell demensions computer I had laying around this morning. The computer has a pentium 4444 , 2.4g processor, 1 - 120g hdd, and 1.2g ram. So far I like suse much better than kubuntu but am having issues with samba. Since I rely on that daily I need to get that resolved before tackling apache and php although I know it is working at its base configuration.

So far I have:

  • Installed suse 11.2 using the network install downloaded from openSuse
  • Based on your how-to I exchanged the repositories for samba and updated it
  • disabled apArmor and suse firewall
  • Ran the Samba administrator in yast
  • created a share using the admin tool
  • used menu editor and changed the advanced settings of kWrite to run as root for editing .conf files

I can browse the windows shares on other machines and have successfully saved documents to them from suse. When I try browsing into the new suse server I am challenged for a password even if I try on the local machine. I cas see the suse samba server from windows and it lets me in far enough to see the shares but if I try accessing a share i get denied.

I see now in the share tool in the admin that it only puts in a few options and you can “add” options to a share. At one point in time there was a how-too on the net that showed all of the options required to have a successful samba server but i can’t seem to find it anymore.

Well thats where I am in a nutshell

:slight_smile:

BTW, this is a digression but cat is often unnecessarily used. You could have written:

egrep "FW_DEV_EXT=|FW_CONFIGURATIONS_EXT=" /etc/sysconfig/SuSEfirewall2

Results of tests:


This one failed
k2zs@newsushi:~> testpam -s
If 'testpam' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf testpam
k2zs@newsushi:~>

k2zs@newsushi:~> cat /etc/samba/smb.conf | grep workgroup
        workgroup = RDXA
k2zs@newsushi:~>

k2zs@newsushi:~> sudo /etc/init.d/smb status
root's password:
Checking for Samba SMB daemon                                        running
k2zs@newsushi:~>

k2zs@newsushi:~> sudo /etc/init.d/nmb status
Checking for Samba NMB daemon                                        unused
k2zs@newsushi:~>

this one didn't do  anything
k2zs@newsushi:~> sudo pdbedit -L
k2zs@newsushi:~>

k2zs@newsushi:~> cat /etc/sysconfig/SuSEfirewall2 | grep FW_LOAD_MODULES=
#   FW_LOAD_MODULES="nf_conntrack_netbios_ns"
FW_LOAD_MODULES="nf_conntrack_netbios_ns"
k2zs@newsushi:~>

I didn’t know that – thanks – I learn something new every day :slight_smile:

@k2zs

Thanks for those portions.

Sorry, I meant “testparm -s” – typo.

There is one point I see already: your naming daemon, nmb, is switched off, so ppl won’t be able to see your server easily. GoTo Yast → system → runlevels. Find nmb and enable it.

And notice I changed the request for examination of SuSEfirewall2 in my additional post.

Also, you will perhaps need to add users to the Samba user database, but let’s wait and see whether “secure” or “guest-accessible” shares are what you made.

I was looking at the smb.conf file and see there is a LOT of stuff missing based on a backuk smb.conf from my kubuntu server. for example the path directive was missing all together. Here is what your other commands returned:


k2zs@newsushi:~> testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
Can't find include file /etc/samba/dhcp.conf                     
Processing section "[homes]"                                     
Processing section "[profiles]"                                  
Processing section "[users]"                                     
Processing section "[groups]"                                    
Processing section "[printers]"                                  
Processing section "[print$]"                                    
Processing section "[netlogon]"                                  
Processing section "[k2zs]"                                      
Loaded services file OK.                                         
Server role: ROLE_DOMAIN_MEMBER                                  
[global]                                                         
        workgroup = RDXA                                         
        security = DOMAIN                                        
        map to guest = Bad User                                  
        printcap name = cups                                     
        logon path = \\%L\profiles\.msprofile                    
        logon drive = P:                                         
        logon home = \\%L\%U\.9xprofile                          
        domain master = No                                       
        wins support = Yes                                       
        usershare allow guests = Yes                             
        usershare max shares = 100                               
        cups options = raw                                       

[homes]
        comment = Home Directories
        path = /home/%U           
        valid users = %S, %D%w%S  
        read only = No            
        inherit acls = Yes        

[profiles]
        comment = Network Profiles Service
        path = %H                         
        read only = No                    
        create mask = 0600                
        directory mask = 0700             
        store dos attributes = Yes        

[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
        create mask = 0600
        printable = Yes
        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

[k2zs]
        path = /home/k2zs
        read only = No
        inherit acls = Yes
k2zs@newsushi:~>

k2zs@newsushi:~> egrep "FW_DEV_EXT=|FW_CONFIGURATIONS_EXT=" /etc/sysconfig/SuSEfirewall2
FW_DEV_EXT="any eth0"
FW_CONFIGURATIONS_EXT="samba-server"
k2zs@newsushi:~>

k2zs@newsushi:~> cat /etc/sysconfig/SuSEfirewall2 | egrep "FW_DEV_EXT=|FW_CONFIGURATIONS_EXT="
FW_DEV_EXT="any eth0"
FW_CONFIGURATIONS_EXT="samba-server"
k2zs@newsushi:~>

I have a feeling it is probably in my global directives. Based on the back up smb.conf there is a LOT of declarations missing.

Also I don’t believe I did any of the command line user creation or passwords. I think I saw that somewhere. Does that have to be done over and above the user tab in the yast samba admin?

k2zs wrote:
> I can’t get it working using the admin tool and I can’t sudo the conf
> file as I get an error that states:
>
> k2zs@newsushi:~> sudo kwrite /etc/samba/smb.conf
> root’s password:
> kwrite: cannot connect to X server

just as an aside, in case you need it later (since your experience on
kbuntu with sudo is not always (as you have learned from the above
error) applicable on all other linux distros available):

“sudo kwrite” doesn’t work on openSUSE, instead use


kdesu kwrite

you can use that to launch any gui application with root/superuser
powers, like


kdesu dolphin

if you run Gnome, then you would use gnomesu [something]


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

@k2zs

Don’t worry about missing stuff when compared to Kububtu. There are a zillion unnecessary things that the Debian Devs (who fit Samba to Kubuntu) put in there essentially for ppl to read, most of it is comment, skipped by the operating system.

You said that you made a share, this seems to be it:

[k2zs]
path = /home/k2zs
read only = No
inherit acls = Yes

That is you trying to share your home directories. You don’t need to do that because they’re already shared in this structure:

[homes]
comment = Home Directories
path = /home/%U
valid users = %S, %D%w%S
read only = No
inherit acls = Yes

I suggest a series of steps.

  • Backup your current smb.conf file with this command:
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
  • Open smb.conf for editing with this command:
kdesu kwrite /etc/samba/smb.conf

Select/hignhlight all the text inside of it and paste the following text over the top to change it completely (to the following):

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: 2009-10-27

[global]
workgroup = RDXA
netbios name = newsushi
name resolve order = bcast host lmhosts wins
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 = 65
usershare allow guests = Yes
usershare max shares = 100
usershare owner only = False

[homes]
comment = Home Directories
path = /home/%U
valid users = %S, %D%w%S
read only = No
inherit acls = Yes

Share disabled by YaST

[profiles]

comment = Network Profiles Service

path = %H

read only = No

create mask = 0600

directory mask = 0700

store dos attributes = Yes

Share disabled by YaST

[users]

comment = All users

path = /home

read only = No

inherit acls = Yes

veto files = /aquota.user/groups/shares/

Share disabled by YaST

[groups]

comment = All groups

path = /home/groups

read only = No

inherit acls = Yes

Share disabled by YaST

[printers]

comment = All Printers

path = /var/tmp

create mask = 0600

printable = Yes

browseable = No

Share disabled by YaST

[print$]

comment = Printer Drivers

path = /var/lib/samba/drivers

write list = @ntadmin, root

force group = ntadmin

create mask = 0664

directory mask = 0775

Share disabled by YaST

[netlogon]

comment = Network Logon Service

path = /var/lib/samba/netlogon

write list = root

  • change the netbios name to somethibng better if you prefer, I just put in the default (newsushi).

  • save the document

  • You have not opened the firewall properly for Samba. I notice that the “holes” for “netbios server” and for “samba client” have not been made, just the hole for “samba server” has been made. To open the other two do this:

Open Yast → Security and Users → Firewall. Select Allowed Services from the list in the left column. Make sure the panel is set to “External Zone” in the drop-down list in the top portion.

Now look at the drop-down list under the heading “Service to Allow”. Select “Samba Server”. Click the Add button and it will appear in the panel below the heading Service to Allow. Repeat the procedure to insert “Netbios Server” as a service in the panel. Repeat the procedure once again and insert “Samba Client” in the panel

The quote is from here: link to method. Ypu’ll find that “Samba Server” has already been done.

  • now add the user k2zs to the samba user database with this command:
sudo smbpasswd -a k2zs

answer the question and give a password when asked.

  • check that you’ve enabled the Samba daemons with these two commands:
sudo /etc/init.d/smb status

and

sudo /etc/init.d/nmb status
  • reboot the computer, pause, then reboot the windows computer/s, pause, reboot your modem and router and any network switches.

You should now be able to see the share labelled “k2zs” from the windows computers and log onto see all your files and directories by using the username k2zs and the password you just generated for the Samba user database.

The Kubuntu machine probably will have difficulty reading openSUSE but that’s fairly easy to fix, ask if necessary, that’s if it’s still active.

That did the trick, sort of…

I can access the samba share “homes” from the kubuntu box but not from windows. At least now I can start transfering files to this machine from the failed kubuntu server so I can blow it up.

Next trick is windows. BTW I have disabled the firewall and apparmor in yast so that isn’t an issue right now. When I get everything working I want to re-enable it.

From windows I can see this samba server and it’s shares (including Groups, Profiles, and Users which are commented out in smb.conf) but when I try accessing the Homes share I get the standard windows “not accessible, user permissions, contact admin, path not found” dialog. Smb and nmb are running.