bill's blog

Just another WordPress weblog

Browsing Posts in Fedora

Here is an easy way to change the background image of your login screen on RHEL machines.

The normal background screen we get in our RHEL machines.

Now I want to change the background other than the default. Simple. Just upload a new file named background.png into the following directory

cd /usr/share/gdm/themes/RHEL

Gaining root Login from the GUI on Fedora 16

Fedora 16 doesn’t allow root logins by default… only Normal users are allowed to login from the gui. What to do? Sometime tasks are just easier if you log into the box as root. NOTE: Logging into a box as root is considered a security risk to many. BUT if you must… follow along!

If You want to login as a root from GUI in Fedora 16 then you have to edit something like some files which are located to /etc/pam.d/

Start a Terminal session logged in as a normal user that has admin privileges.

$ su – root

# cd /etc/pam.d/

First backup the gdm file

cp gdm gdm.bkp

Next edit the gdm file… I use vi but you could use any editor you prefer.

# vi gdm

Comment out the line in your gdm file that looks like this
auth required user != root quiet

it should now look like this
#auth required user != root quiet

Save the changes you’ve made.

Next you need to edit the file gdm-password. Again you should really back up the file… SO

#cp gdm-password gdm-password.bkp

#vi gdm-password

Comment out the line in your gdm-password file that looks like this…
auth required user != root quiet

See above for how to comment out a line. Save the changes you’ve made to this file

Logout and login as a root user. You’re all set… Have fun!

Fedora 16 comes pretty locked down out of the “box”. If you want access you it through ssh or some other network protocol you’re going to need to do a few things.

I want to start out by saying that the following with make you install less secure so you should really know the reasons why you are doing this. NOTE: a more secure way to do this would be to properly configure you Firewall and SELinux.

First thing you’ll need to do is disable your firewall… then SELinux… and then (in this case) start up sshd.

Disable the Firewall

$ systemctl status iptables.service
Check the status of the Firewall service.

You should see something similar to this.

iptables.service - IPv4 firewall with iptables
Loaded: loaded (/lib/systemd/system/iptables.service; enabled)
Active: active (exited) since Tue, 08 May 2012 12:15:55 -0400; 5s ago
Process: 2523 ExecStop=/usr/libexec/iptables.init stop (code=exited, status=0/SUCCESS)
Process: 2586 ExecStart=/usr/libexec/iptables.init start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/iptables.service

$ sudo systemctl stop iptables.service
This will stop the service from running.

Disable SELinux.

# vi /etc/sysconfig/selinux

Edit the files to read…

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.

Enable sshd service.

$ systemctl status sshd.service
you should start by making sure that the service isn’t running.

You should see something similar to this.

sshd.service - OpenSSH server daemon
Loaded: loaded (/lib/systemd/system/sshd.service; enabled)
Active: inactive (dead) since Tue, 08 May 2012 12:22:15 -0400; 6s ago
Process: 883 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/sshd.service

$ sudo systemctl enable sshd.service
Enable the sshd service

$ sudo systemctl start sshd.service
Check sshd status if needed.

$ sudo systemctl restart sshd.service
This can be used to restart the service should you have problems.