
Sunday, 24th February 2008 at 07:21pm
We added a user before to use for ourselves, but I never really went into how to change your password or delete a user, or a lot of other things you can do.
To change your full username, use chfn -f newusername. You can change the other information you added too, just do a manual lookup to get them (man chfn).
You can change your password by using the passwd command. You'll have to put your old password in first, unless you're root, and then your new one.
You can also delete a user, using deluser usertodelete. Obviously, don't go deleting your own user.
Thursday, 14th February 2008 at 05:42pm
I want to learn about file permissions. Yes, you heard me. I want to learn. I don't actually know much about them yet. Why am I doing an article about them if I don't know what they do, you might ask. And I'd have to reply, "good question. I don't really have an appropriate answer." Onwards?
Unix is a multiuser based operation system, like I mentioned before, so there has to be a way that it controls which files a user can look at. That's done with permissions. At the moment, your /var/www/ is going to be owned by www-user which is a user that Apache made when you installed it. Unless you log in as root, or that user you won't be able to edit or add files in there at the moment. Lets learn how to change that.
First, head to your into your /var/ directory, and then show the files with their data, (if you don't know how to do that, then you should read through a few of the posts I've tagged for commands.)
drwxr-xr-x 4 root www-user 1.0K Feb 12 22:38 www
You'll have something like that for your /www/ directory. The "drwxrwxr-x" is what we're interested in, since that tells us the permissions. The first letter tells us that it's a directory, then the rest are in blocks of three; the first block is for users, then groups, then others.
r means that they can read from that file or directory, the w means they can write to it, and the x is to execute it.
What I did was "chgrp -R shamess /var/www/" and that changed the group so that I was in it (the -R switch was to make all the files and directories inside it change too). Then I needed to give the group permission to edit the files; chmod g+w /var/www.
And that was it. Now you can edit files in your /www/ directory without having to be root.
There's a more detailed article on permission types and how they work over at FreeOS; Understanding Linux file permissions.
Wednesday, 13th February 2008 at 02:04am
Now we have our virtual server and Redwood were nice enough to install Debian for us (because I've idea how). You wanna rush in a get going; I was literally bouncing around the house when I got my "your server is up and running!" email from them.
Of course, at the moment you've no idea how to connect to the server. The first thing you'll need then is PuTTY, if you're on a Windows machine like I am. So far, I've only found the need for the standard "putty.exe" so that's all I've got. It's a tiny application, and it's probably worth sticking it on a pen drive so you can take it with you everywhere, for those times when you just have to check on your baby <3
When you start it up you'll be given a huge list of daunting options. Don't worry though, if I'm completely honest, I've not looked at most of them after my quick glance when I first excitedly installed it. All you really need to do to get going is to fill in your IP address or host name (I've put in my VPS's IP address; type that in your URL and you'll get back to the homepage for Trinity). It should already be default on port 22, since that's the default for SSH.
Then click "save" so that you don't have to keep typing your IP address every time you want to log in. There's nothing wrong with leaving your IP address public (you probably know you can get to it through DNS look ups anyway). Then press open.
Then you'll be presented with a black screen. Give it a second (depending on how fast your server is, and how fast your local internet connection is) and it'll ask you to log in. At the moment you'll need to log in as root. "Root" is the administrator account of a linux server, it can do absolutely anything in the system. Next you can type your password. Nope, nothing's showing up. Trust me though, it's being typed. Instead of putting stars in place of your letters, it just won't show them up. Press enter and you'll get to see the start up/message of the day thing.
It's best never to play around as root; so far as I've learnt, not even experienced linux users do that. It's too easy to delete something that's far too important (unlike Windows, there's nothing to stop you just deleting Debian critical files). To counter that, you have to set up a new user. To do that type "adduser username", obviously replace username with the user name you want to set up.
The username has to be in ascii, and all lowercase.
Then it'll ask you some random details. Most of it you can just skip (by pressing enter). Debian was created with multiple users in mind, so having that random contact information for each user made things easier when you're trying to find out who broke something.
Play around as your new user – I called mine "shamess" – for a while. You can find a good FAQ and section for people new to unix servers, with some basic functions at LinuxHelp.net.