iGuest 3 Report post Posted February 24, 2013 When you have finished a minimal install of Fedora 18 you have only the terminal (tty1-tty6) which by default will start on tty1. You will need to log in with root using the password you created during your minimal installation. Note: All the following commands are done in root until we have finished creating your user. Creating a User in Fedora 18 To add a new user that we want to have sudo rights we do: useradd -c "Your Display Name" -g users -G wheel YourUserName useradd is the command to add new users to your system. -c is the comment, which you change Your Display Name to whatever name you would like to have shown at a graphical log in screen and as the name shown on a graphical desktop. They use this comment for displaying that. -g is the command to add yourself to an existing group which I have chosen to add you to users. It should do this as default but Fedora usually creates a new user group based on your username which I find quite messy if you would have a large number of users, each with their own group as their username. -G is to add secondary groups for your user, we are adding this user to the wheel group so that we will be able to issue the sudo command which should be default for users in the wheel group. Setting up Your Users Password in Fedora 18 To set a password up on your newly created user, we issue the command: passwd YourUserName Change YourUserName to the user name you set up above. This command will give you a prompt to create the password. Enter your password. You have now created a password for that username. Enabling The wheel Group so You Can su to root Our next step is to allow us to su to root if we need to so that if we do need to work in root we can, root is disabled in graphical interfaces but not from the terminal. To set this up we first need to edit a file, so run: vi /etc/pam.d/su If you look at this file, it has a few comments suggesting what we can do. The line we want to uncomment is the one after the line that says: # Uncomment the following line to require a user to be in the "wheel" group. Move your cursor over the # using the arrow keys to navigate to this line #auth required pam_wheel.so use_uid and then press x to delete that character then press :wq followed by Enter to write (save) the file and then quit. If you would like to learn more about vi(m) you should keep checking back here as I'll be writing a guide on using vi(m). It's an amazing terminal based text editor. I suggested using arrow keys for navigating but we can use letters to navigate too but I'll save that for my guide. Making Sure sudo is Set up Correctly I decided to add this because other distributions like CentOS or RHEL do not have the wheel group set up to be able to perform sudo, so this is really targetted for those distributions and others that may not have it set up by default. To check first we do: visudo Which opens up a vi editor with the sudoers file opened for us. Now in command mode (pressing Esc gets us into command mode) which is default type: /%wheel To search for this line. You will know it's the correct place if a comment above it says Allows people in the wheel group to run all commands I don't recommand uncommenting the one that says using it without a password, this is not secure. If the line has the comment marker (#) in front of %wheel, navigate over it with the arrow keys and press x to delete the character then press :wq follwed by Enter to save and quit the file. Lets Test Everything Out Now OK, so we have now set up our main user who can gain super user privileges when needed so we are now able to work with just this user and can now avoid logging into root. To log out of root user first type: exit Now to log in with your new user type: YourUserName Where YourUserName is the username you created above. Then type in your password you created for this user. Test if we Can su - to root The first test is checking if we can get a root prompt. So first do: su - Make sure you include the hyphen/dash, this means you'll have the PATH of root known to you, which saves you typing exact locations, e.g. Instead of /usr/bin/python you can just type python now. Enter the password for root. If you now have root showing instead of your username, congratulations this test was successful. Now type exit followed by Enter, this should return you back to your user prompt. Test if we Can sudo We are now going to test if sudo works, we require an internet connection as we will be downloading some worthwhile plugins to have that increase the speed of downloading: sudo yum -y install yum-plugin-fastestmirror yum-presto Enter your password, if yum starts working without any problems, then sudo works. Once this has finished we will now update the system. If you installed using the Network Install CD, there should not be much updates. The DVD install should have a few, but because we have a minimal installation, it should not take as long. So issue the command: sudo yum -y update Again, check back here at Xisto where I will explain more on using yum. Once your system is finished updating. It's a good idea to restart your computer and run the update command once more. To restart your computer do: sudo shutdown -r now Installing a text web browser If you want a text browser then run: sudo yum -y install elinks This will now install a text web browser just incase you need to be able to find information. Just type elinks to start it which presents you with the address bar to type where you want to go e.g. https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl you use the arrow keys Up and Down to navigate through links, Page Up and Page Down to quickly scroll through a page. Right key to follow a link Left key to go back a page. g to open up the address bar to type a new address to browse to. Inside Entry Fields you usually press Enter to start editing them and then Enter again to finish editting and automatically send the request. You can use Space bar to accept OK buttons, etc or press the Alt key followed by the hi-lighted letter of the action you want. e.g. Alt+O for OK and Alt+C for Cancel. That should be enough to get you around. Be sure too look in the status bar for more details on where you are whether you're on a link or in an entry box and it'll explain what keys you can press sometimes. Having Multiple Terminal Screens Sometimes you'll need multiple terminal screens, like having multiple windows. That way you can be in your text browser as well as at a prompt ready to type commands you find. Just press Alt+F# where # is a Function key between 1 and 6. If you are at tty1, then Alt+F2 will open up tty2 for you and you just log in normally, and now you can switch between tty1 and tty2. Press Alt+F1 to return to tty1. This definitely helps if you need to be reading a guide on how to set up your system if you have not taken everything down. Well Done! Congratulations, you've completed everything in this guide. Stay tuned for when we install a Graphical User Interface (GUI), because browsing in a text browser may not be to your liking, especially since you can't take advantage of flash games or view pictures of friends shared by facebook. Shutdown your system To shutdown your system just do: sudo shutdown -h now Cheers, MC Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 24, 2013 When I had first rebooted the system I noticed an error message appear just before the grub menu showed up. The message was as follows: error: file '/boot/grub2/locale/en.mo.gz' not found If you notice this message we can easily fix this so it won't appear again. Since my language is English I will be using the English files to create this file. If you are using another language then you'll need to use those files to fix it for your language When you log in as your user do: cd /boot/grub2/locale sudo ln -s en\@quot.mo en.mo This links the en@quot.mo file as en.mo file which is the missing file error message that you get before grub. It does not matter if it is not gzipped compressed as it checks for gzipped, before checking uncompressed files. If changes happen to grub, I believe this needs to be fixed again unless it no longer shows. This should solve that problem. I recall this error from Fedora 17 as well, so I believe it has not been fixed. It's not a serious problem, but I don't like seeing error messages at all. Cheers, MC Share this post Link to post Share on other sites
Ahsaniqbalkmc 0 Report post Posted February 24, 2013 Great tutrorial @mastercomputers ! I have a question that is not directly related to the minimal install of fedora 18 but is more about the use of terminal to operate the linux operating system. It has happened with me in the past that I would go on with installing a linux distribution onto my system but something strange would happen during the installation (which I have never got the chance to get aware of). I should make it clear here that I don't know what is this something strange and I have never witnessed it. But because the end result is not what is expected so I am assuming that something out of the ordinary and out of expected would have happened during installation.Whatever the reason, the end result in these cases is that when I restart my computer after the installation is complete, all I get is a full screen command line which is expecting me to input some commands (as I could tell from the blinking cursor). I don't remember the exact case, that is during which distribution's installation this happened (and I certainly don't have time to retry all the distros that I have installed previously) but I remember the situation and it got into my mind after I read your post.So I get a terminal screen which is expecting me to enter some useful commands. Common sense dictates that all the components for the graphical interface are installed but somehow they couldn't manage to start automatically. I am saying this because all the distros I have tried had a proper graphical user interface and none of them were minimal installs. So the components required to present the graphical interface should be present. But because they didn't start automatically, they need to be started manually, but for this to happen some commands are needed.So do you know of any commands that can be used to start the graphical user interface. In addition, a detailed tutorial about how to manage such a computer will also be very helpful.And last but not the least, it would also be great if you talk about what could be causing this issue i.e. failure of automatic starting of the graphical user interface. Share this post Link to post Share on other sites
yordan 10 Report post Posted February 24, 2013 OK, seems that you ask several questions at the same time.If you are on a working non-graphic terminal, because for some reason the X session did not start, simply type "startx" on the Linux command line.The other point is that, it seems that you LInux system did not start automatically, because the default auto-start is not defined.Then, if you are using the grub booting environment, you need to know how to repair the grub environment. This is one of the next tutorials MC promissed us. I will not do it because I'm a Lilo fan :DI don't know how it behaves with fedora 18, but with most of Linux distros, when booting on the distribution DVD you can access a menu asking if you want a fresh install or if you want to repair your current install, and then choose to repair the boot loader, and define which operating system will start first.Of course, I guess that, if you want to create a multi-boot PC, you still have to install Crosoft Windows first, and the install Linux, else you will disturb your boot order sequencer. Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 24, 2013 Hi Ashaniqbal111,The issue you describe could be the grub bootloader which can present it's own grub prompt when something goes wrong with reading the boot information. Incorrect installation of the bootloader can also cause this, and I wrote many years ago how to reinstall grub from the grub prompt for one of the members here and I believe the method is still the same. If I locate it I'll post the link.I found the link, it seems it was a guide on Fedora Core 14 in which I encountered the grub prompt problem. Whether these instructions have changed or not, I am not sure, but usually if I'm writing a guide and encounter the issue and can fix the issue, I include that with my guide. Unfortunately, I will not be able to see them all but if others encounter problems, they should share them and we may be able to solve the problem together.If you are just seeing the flashing underscore that looks like you can type and doesn't present any type of information, this can also be a problem with the bootloader, in which it has silently crashed here after trying to boot up. Can happen with Windows as well, so the error is more boot loader specific, but usually restarting can get it back to normal. If not, restoring the bootloader can help.If however, you've reach the tty1 terminal, where it actually asks you to log into with your username and password, then this means you've reached the operating system but possible that your GUI failed to run. It could just mean you've set your boot up to runlevel 3, in which case you won't get a GUI. If rebooting does not get your gui back, you can try what yordan suggested startx, it may also explain what problems occured too.Cheers,MC Share this post Link to post Share on other sites