Skip to main content

Uber newb in Linux

More
19 years 1 month ago #10568 by jhun
Replied by jhun on topic Re: Uber newb in Linux
setting up apache in windows is not that hard. once you have installed it, it is as easy as playing around with the httpd.conf file. if you happen to browse your config file (httpd.conf) you would see there directives such as "Document Root". this directive specifies where your site would be stored. you could use the default or specify a different one. i would suggest making a folder under the Apache\Apache Group folder like "webroot" or "sites" then point your directive there in that way site management would not be too hard. also, if you plan on hosting multiple sites on just one server running Apache, setting it up is also a breeze. Just make another directive under your http.conf file, specifically
[code:1]
<VirtualHost *:80>
DocumentRoot Apache\Apache Group\webroot\SampleSite
ServerName SampleSite.com
ServerAlias AnotherNameforSampleSite.com
</VirtualHost>
[/code:1]
the directive &lt;VirtualHost *:80&gt; means that any request made pointing to your server would listen to any network interface on port 80. DocumentRoot specifies where your webpages would reside. ServerAlias specifies another name to which your site is called upon (like www.SampleSite.com and/or SampleSite.com - this is like the host headers in IIS). and then the </VirtualHost> signals that the directive for the specific site has ended.
you can make multiple sites by just repeating the method as above for all your different sites.

hope this helps. :)
More
19 years 1 month ago #10753 by Bublitz
Replied by Bublitz on topic Re: Uber newb in Linux
Yea I messed with the httpd.conf file in windows to get it going. I also did this in Linux using the fedora core gui tho. When I try to connect to it by firefox I get a "rejected" message. The group that I setup in apache has like full acces to the web site files I dont think it a persmissions issue.

Things ive done.
1. Installed DNS and configured. DNS was already installed but I installed another one anyway for practice. Installing stuff in linux I find very confusing. Its configured and I "think" its running im not sure. Didn't know about the TOP command in Linux until it was posted here.

2. Configured Samba and setup a share in linux. IT WORKS! Thats how I transfered the web site to the linux server.

3. Installed apache. Again it was already installed but I did it anyway for more practice. Installing steps or commands were different for DNS and apache. I don't know why or how I would know which commands to use my self. Its weird and confusing that different programs need different commands to install. SO far the online help is good anyway so who cares I guess.

4. And the obvious I installed fedora..

Things I WANT to do yet.

1. Mess around with the firewall/security could of done that during install but opted out. I already have adequite hardware firewall, but I still want to learn.

2. Joining a NT domain with samba. I want to have one place for users and passwords. SO I will join the NT domain since I know that well. Got everthing working except THE LAST STEP hehe.

Joining an NT4-type Domain with Samba-3
Assumptions lists names that are used in the remainder of this chapter.

Table 6.1. Assumptions

Samba DMS NetBIOS name: SERV1
Windows 200x/NT domain name: MIDEARTH
Domain's PDC NetBIOS name: DOMPDC
Domain's BDC NetBIOS names: DOMBDC1 and DOMBDC2

First, you must edit your smb.conf file to tell Samba it should now use domain security.

Change (or add) your security line in the [global] section of your smb.conf to read:

security = domain

Note that if the parameter security = user is used, this machine would function as a standalone server and not as a domain member server. Domain security mode causes Samba to work within the domain security context.

Next change the workgroup line in the [global] section to read:

workgroup = MIDEARTH

This is the name of the domain we are joining.

You must also have the parameter encrypt passwords set to yes in order for your users to authenticate to the NT PDC. This is the default setting if this parameter is not specified. There is no need to specify this parameter, but if it is specified in the smb.conf file, it must be set to Yes.

Finally, add (or modify) a password server line in the [global] section to read:

password server = DOMPDC DOMBDC1 DOMBDC2

These are the PDC and BDCs Samba will attempt to contact in order to authenticate users. Samba will try to contact each of these servers in order, so you may want to rearrange this list in order to spread out the authentication load among Domain Controllers.

Alternatively, if you want smbd to determine automatically the list of domain controllers to use for authentication, you may set this line to be:

password server = *

This method allows Samba to use exactly the same mechanism that NT does. The method either uses broadcast-based name resolution, performs a WINS database lookup in order to find a domain controller against which to authenticate, or locates the domain controller using DNS name resolution.

To join the domain, run this command:

root# net rpc join -S DOMPDC -UAdministrator%password


If the -S DOMPDC argument is not given, the domain name will be obtained from smb.conf and the NetBIOS name of the PDC will be obtained either using a WINS lookup or via NetBIOS broadcast based name look up.

The machine is joining the domain DOM, and the PDC for that domain (the only machine that has write access to the domain SAM database) is DOMPDC; therefore, use the -S option. The Administrator%password is the login name and password for an account that has the necessary privilege to add machines to the domain. If this is successful, you will see the following message in your terminal window. Where the older NT4-style domain architecture is used:

Joined domain DOM.


Where Active Directory is used, the command used to join the ADS domain is:

root# net ads join -UAdministrator%password

And the following output is indicative of a successful outcome:

Joined SERV1 to realm MYREALM.


Refer to the net man page and to the chapter on remote administration for further information.

This process joins the server to the domain without separately having to create the machine trust account on the PDC beforehand.

This command goes through the machine account password change protocol, then writes the new (random) machine account password for this Samba server into a file in the same directory in which a smbpasswd file would be normally stored. The trust account information that is needed by the DMS is written into the file /usr/local/samba/private/secrets.tdb or /etc/samba/secrets.tdb.

This file is created and owned by root and is not readable by any other user. It is the key to the domain-level security for your system and should be treated as carefully as a shadow password file.

Finally, restart your Samba daemons and get ready for clients to begin using domain security. The way you can restart your Samba daemons depends on your distribution, but in most cases the following will suffice:

root# /etc/init.d/samba restart

THIS STEP doesnt work the file/folder whatever it is isnt there.
In fact im not sure what this directory is for there is alot of folders/files here.


3. Be able to remote into it. I see it has VNC viwer installed do you guys recommend VNC Server for remoting?

4. I have a windows 2003 DNS server already and I'm pretty sure my Linux one is working also. What I want to be able to do, is have the Linux and windows updating each other Zone transfers or dynamic updates (not sure which one would be better).

5. Host my web site and friends. Some knowledge on making it secure also. Also be able to FTP to make FTP sites.

6. E-mail server POP3 and SMTP for my domain/e-mail bublitz@thebublitz.com

7. My previous web hosted had a /cpanel on it. In the cpanel I could make my own e-mail account BLANK@thebublitz.com. Make subdomains also could make my OWN message boards using the cpanel. I could see my web hits do a lot more. The web boards you made were phbb or somthing like that.

8. How do I know somthing is in the "startup" in Linux. In windows I could edit registry or add program to startup easily. I want to know how to do that also /msconfig basicly for windows.

Dang thats a huge list hehe. Althought im am getting better ive got some things done ive been moving around in shell decently.

I dont edit permissions from the shell I have to use GUI still. Copying still use gui. I do use gui to see if certain files exists cd and ls commands. Ive used VI to edit some files. So far its a slow process but it fun learning something new. When I use gui to navigate it opens a new window for every directory I go in it drives me insane, so that keeps me using the shell which is a good thing really hehe.

Thanks for your help so far guys im going to try these things once I get a monitor. The Windows PC im running VM ware I cannot get into it becuase I made it a VPN server....Now I cannot remote into it anymore LOL not sure why so I need a monitor to get control back.

The Bublitz
Systems Admin
Hospice of the Red River Valley
More
19 years 1 month ago #10765 by jhun
Replied by jhun on topic Re: Uber newb in Linux
hi bublitz,

just out of curiosity, could you please post the exact error message you get when trying to access you site on apache? also, i suggest that you bring back the previous permissions granted by default on the apache user and group as this are security measures.

by the way, nice post on the samba - nt authentication. i've been looking for something like this as this is also one of my current projects. if you don't mind, may i know your reference? thanks :)
More
19 years 1 month ago #10770 by Bublitz
Replied by Bublitz on topic Re: Uber newb in Linux
I tried the TOP command.
Its what I am looking for.
Although I dont think it shows eveything. WHen I start DNS server a "process"(not sure what its called in linux) called NAME showed up for like a second then goes away. DNS is up and running but I dont see it in the process list. I know task manager/windows has Applications, Process, and Services...does linux do this as well is that why the top command doesnt so my name server running?

Jhun I will post where I got that info tommorow. Its saved on my laptop. Their articles they have are in depth and tell you how to join domin be domain contoller ect. pretty much any combo you would like.

Im glad you are working on this also we can help each other so far ive got everythign but the last step to work.

I need to find my entry level book for linux I took back in college hehe.

P.S. The connection was refused when attempting to contact www.thebublitz.com .

Also found services in the GUI thats where Named was. SO I can tell if its running from there. Anyone know the Command used on the terminal for this info?

I want to try and be able to do everything WITHOUT the gui hehe (=

The Bublitz
Systems Admin
Hospice of the Red River Valley
More
19 years 1 month ago #10772 by jhun
Replied by jhun on topic Re: Uber newb in Linux
hi bublitz,

thanks for the info and maybe we could share facts on the nt-linux relationship 8)

by the way, the error most often appears when the apache daemon is not running. make sure that apache is running by typing in:
[code:1]
service httpd start
or
/etc/init.d/httpd start
[/code:1]

also you could check running services by doing a
[code:1]
chkconfig --list
[/code:1]
in your prompt and check all the services that starts at startup
More
19 years 1 month ago #10778 by DaLight
Replied by DaLight on topic Re: Uber newb in Linux
Just a followup to the question on the "top" command. "Top" only shows the most CPU-intensive processes on its intial screen. You can use top's interactive mode to get information on other processes or increase/decrease the number of processes shown. Use "man top" to get more info.
Time to create page: 0.134 seconds