|v0lcom's Gameplay Stats Today|
Can't Trust HoesPosted on: January 27, 2013, at 12:40:46pm
]Setting up Ubuntu Server Day3Posted on: December 23, 2012, at 05:55:58pm
In continuation of setting up my server;Setting up Ubuntu Server Day2Posted on: December 20, 2012, at 10:44:31am
I have setup a Windows Server 2008 R2 Domain Controller. I wanted to learn how to add Ubuntu to a workgroup and add to a domain. I'm not 100% sure if this is the only way but to add a linux box to a workgroup - I had to install the Samba Share and edit the conf file to my home workgroup. In addition - I went a head and added my linux server to the windows domain.
I had to install something called "likewise-open5" which handles domain features. I also had to make sure my hostname could be reached by the windows box and check for dns. After that I went a head and added my box to the domain "sudo domainjoin-cli join volcyworld.com Leo(windows user w/domain admin). After that its best practice to update dns with "sudo lw-update-dns"
After that I rebooted the server and tried to login as my domain user but couldn't do much such as sudo. In order to allow this I had to modify the "sudoers" file in "/etc/sudoers" and add the following line; %volcyworld\\domain^users ALL=(ALL) ALL
Once that was done I logged out of my linux box - did a quick telnet back to the login screen. Proceeded to login as my windows account - volcyworld\leo and sure enough I can now Sudo as a domain user in my linux box. Cool stuff.
*I managed to install another plugin called Webalizer this morning to help monitor page hits for my FTP site or anything being accessed on my server. It's not the fanciest tool but it graphs out and gives percentages which is useful. I ran into a small issue where I may have downloaded an older package of Webalizer and it wanted to use an old LogFile path which was /var/log/apache/access.log. I did a locate access.log and I found out it was under /var/log/apache2/access.log instead. So I simply put a "2" in the path under the webalizer conf file listed under /etc/webalizer - vi webalizer.conf. From there I went back to Webmin and modified my Scheduled Cron Job to "Run Now" - sure enough no errors this time regarding apache not being able to read the old log directory. I went to 192.168.168.203/webalizer and my report had already posted. Setting up Ubuntu Server/FTPPosted on: December 19, 2012, at 01:16:05pm
*Currently researching Unix Groups/Users/Permissions/Jailing
*Some things that stuck out to me regarding Permissions;
Permissions are handled by a 3 digit number i.e 666
6 - Owner of File or Folder
6 - Group Ownership
6 - Everyone else
Each Group or File will have a set of Permissions in an octal 3 digit value or 8bits.
A group that listed as "-rw-rw-r--" will follow this table;
0 --- No Permission
1 --x Execute
2 -w- Write
3 -wx- Write and Execute
4 r-- Read
5 r-x Read and Execute
6 rw- Read and Write
7 rwx - Read, Write, and Execute
So if looking at this table and "-rw-rw-r--" as our permissions - we need to figure out what the octal value is;
I take -Rw which equals 6 - Owner
I take -Rw which equals 6 - Group
I take -R which equals 4 - Everyone Else
This tells me 644 is the number and by following the table - I can easily tell what permissions are assigned to a group.
I can change this number for any file or folder by doing sudo chmod 644 file or folder (-R recursive for folders if you need to have 644 migrate down into sub folders.)
Currently setting up Ubuntu Server in VmWare Workstation 8. I am very new to Unix and today I'm at home dedicating my time to this! Btw - I hate the Vi editor! What a piece of junk! Maybe after all this I'll setup a SFTP site as well.Windows 8Posted on: December 17, 2012, at 11:40:21pm
Steps so far:
*Install telnet and ssh servers for remote access - telnet is a feature in windows and needs to be installed before use / for ssh I use PuTTY/easy and free.
*Set Static IP sudo vi /etc/network/interfaces input your network settings; *change Dhcp to Static
iface eth0 inet static
dns-nameservers 22.214.171.124 126.96.36.199 (googles free dns servers)
*Remove DHCP client on the server sudo apt-get remove dhcp client - this ensures the server will not try to assign a dhcp address vs. static
*Restart the Nic sudo etc/init.d/networking restart (lets you restart the Nic without restarting the entire server)
*Set nameserver and hostname ( i named my test server "Pnut" from 311 ) On a side note - if you can only ping the IP of the server but not the hostname "Pnut" then your router may need configuring with DNS Masq or simply go into your clients host file and make a record of the server to resolve to.
*Install proftpd server - FTP service
*Edit the "Shells" file in Vi with /bin/false so FTP users accounts can not access via telnet or ssh / more or less a virtual user ( security )
*Create a user account -
cd /var/www ( I had to create the www directory/mkdir www)
Create another directory for the user account once inside the www directory - mkdir user1
useradd user1 -p (root pw) -d /var/www/user1 -s /bin/false (adds the user account and tells where to put the user and the /bin/ rule sets no remote server login)
Change the ownership of the directory for the user accessing - chown user1 user1 - if I don't do this then the user won't be able to upload files since root would own the directory)
set the password for the user1 account - passwd user1
*Verify user account by starting a ssh session - I got denied as expected. Also opened up firefox and did ftp://192.168.168.203 - got prompted for a username and pw. I entered in user1's credentials and was in. I did the same for Windows explorer - created a folder and uploaded a picture to it. Went back to firefox and sure enough everything was there.
*Came across a forum for some Ftp security. I wanted to ensure all FTP users were locked down from browsing the entire server's directory structure. To do this I have to edit the proftpd.conf file and delete the "#" symbol from "DefaultRoot" in the Vi editor. I can also edit other features in this area as well such as; timeout sessions, port ranges, greetings, denyfilters, etc.
*Came across a tool called Webmin - http://www.webmin.com/deb.html which gives me a GUI of the server from a browser. How neat! The link gives me everything I need to install this on the server. Once it installed I went to my browser and typed in https://192.168.168.203:10000 and sure enough there are all the directories. One of the things that I like most is the File Manager. This lets me sift through quickly the directories and even browse to the www folder where I previously uploaded a picture to.
*I decided after all this - what else can I do with this server? Well I proceeded to turn it into a LAMP(Linux, Apache, MySQL and PHP) server as well.
To do this I found a command that will do it all!
sudo apt-get install lamp-server^ phpmyadmin
Phpmyadmin was a bit tricky since I'm used to using XAMMP - it did everything for me. This time I had to copy the directory from /usr/share/phpmyadmin to /var/www in order to access PhpMyAmdmin from my browser. I installed the Apache service as well and now have a small web server up and running. I tested Php by making a test file and opening in the browser to see the output. So far everything is working.
*Next thing on my list to figure out how to point my domain name to this server for the WWW to access it. Yay fun...
Just got Windows 8 Pro x64 bit. So far - I like it. Change is good.