PDA

View Full Version : Managing Backtrack, or any Linux distro for that matter


HTSPilot
03-10-2006, 07:51 PM
It seems a lot of us have hardware installs of Backtrack, and unfortunatly, managing Linux isnt all that easy.

I figured I'd start this thread so we can all share tips, tricks, and commands to keep Backtrack healthy on our laptops, desktops, cardashboards, wherever we have it.

I've mentioned a few things here (http://forums.remote-exploit.org/showthread.php?t=646) and I've more to add. On my laptop (Inspiron 6000) the screen shuts off when the lid is closed. To turn it back on, pressing Ctrl+Alt+F8 then Ctrl+Alt+F7 will bring it back on. Weird I know, but it works. Does anyone have an explanation for this?

Currently, I have an uptime of 1 day and 14 hours. This I found via the top command. Backtrack started (once in X) using just under 200MB of RAM, according to leetmode, and now sits at a hungry 465MB. Im guessing I've got processes running I shouldnt need. Again, top reports 64 tasks, and ps -ef shows that list in full.

If there's a process you need to kill, I tend to use kill -s 9 PID. Replacing PID with the Process Identification of the process you want to kill. Usually a 4 digit number.

Sound. I disabled all sounds for now, by going into settings -> Control Center -> Sound & Multimedia -> System Sound, and unchecking Enable the sound system. I very much dislike the boot up sound once X is started and all the sound controls on my laptop are software so I've no way of adjusting it. Which brings me to the next question, has anyone gotten software sound control to work on a Dell laptop? or any laptop?

Post your questions, tips and tricks if you please.

Pilot

tparnet
03-10-2006, 08:07 PM
I was having problems with sound on my laptop (actually, i was trying to run kismet covertly, but the sound kept giving me away :p ) so i searched through all the forums to try and figure out how to stop or control the sound. So first off, in kismet, you can just type the letter "m" for mute, and it will turn off all the sounds generated by kismet. Press "m" again and it will restore it.

Now if you want to control the sound volume, from a shell, you can just type "alsamixer", and a graphical shell will pop up and allow you to control the overall volume, among other things. I use my up/down/left/right arrows to navigate and adjust the controls.

I read all this information somewhere in these forums, so I am not trying to take credit for someone else's hardwork, but merely trying to pass the information I learned on. Thanks and I hope this helps others out as much as it did me.

BTW, I am using a dell x1 laptop.

HTSPilot
03-10-2006, 08:13 PM
That mixer is rather nice. Cheers. I knew about the 'm' for Kismet, but Im sad because the 6000 comes with audio controls on the front (google some pics) but I also have the Fn functions, and none of them, save the wireless radio and screen brightness work. So I've no control over sound which is the biggest concern. I've yet to try my stand-by and hybernate buttons. *pause* Ok I just did and they dont work. The Fn number keypad doesnt work either. I'm lucky I have an LED battery indicator which flashes when the battery gets low else I wouldnt know when my battery's out of juice.

armedpilot
03-10-2006, 08:39 PM
Just to add on to the kistmet "m" for mute option, if you type in a "?", question mark, it will list out all the keyboard shortcuts, and more.

HTSPilot
03-14-2006, 03:10 AM
Just to keep this going, I've added softlinks to ~/.kde/Autostart for both leetmode and yakuake.

I've changed the image of /boot/splash.bmp and reloaded lilo with lilo -v Love my new crossbones image :)

xatar
03-15-2006, 10:59 AM
hi all,

great topic to cover all the aspects of configuring Back|Track to your liking.

HTSPilot: Can you attach your splash.bmp image, I like the sound of a skull & cross bones!

Something I'd like to add to this thread is that i have created a slax module available at http://slax.linux-live.org/modules.php?category=multimedia&id=785&name=BackTrack+specific+Wink+install.

which will install a program called 'Wink' onto your Back|Track. It places it under the /pentest/Video Capture/ directory and will enable to you make shockwave video captures of your screen. Very handy for producing video tutorials. Here is one tutorial (basic windows password cracking with BT) http://www.daveyj.com/stuff/backtrack_local_win_crack.swf that I made with wink, so you can see what it's like. It's not the only tool out there to use, I just made it available in a module.

Hope it helps in some way.
xatar.

xatar
03-15-2006, 01:08 PM
Hi,

I know that lots of this stuff has been posted, but I thought that I would bring it together here.

This is how I have configured my Back|Track full HDD installation. All text in bold is done from the bash prompt.

If you do not like the command line logon and want the KDE desktop to start automatically.

nano /etc/inittab

change the following line:

id:3:initdefault:

to

id:4:initdefault:


If you want leetmode to start automatically.

cd /root/.kde/Autostart

ln -s /usr/bin/leetmode leetmode

That will create a link to leetmode in your autostart directory.


If you want to stop your CDROM from ejecting on reboots and shutdowns, you need to alter the shutdown script.

cd /etc/rc.d

nano rc.6

Find the relevant piece of code and alter it to look like the following

# eject cdrom devices
. ./usr/lib/liblinuxlive
#echo "Ejecting all CDROMs..."
#list_cdrom_devices | while read DEVICE; do
# cdrecord dev=$DEVICE -eject >/dev/null 2>/dev/null
# can't use eject because it's not working with our kernel
# eject -s $DEVICE >/dev/null 2>/dev/null
#done
echo "========================================"
echo "It's safe to switch the computer off now"
echo -ne "Press Enter to $command "
read junk


I also placed a shortcut to Konqueror on my shortcut panel menu (the bottom left shortcut icons).

I did this by right clicking on any of the shortcut icons,
Panel Menu, Add to Panel, Application, Internet, Web Browser (Konqueror)

You will now see a new shortcut next to the /pentest shortcut, this will start Konqueror.


I hope this helps by bringing some of these actions into one thread, thanks to all that have posted this information in other threads.

Edit:

Thanks HTSPilot for reminding me! To autostart YaKuake, which will give you a terminal (bash) window at the press of a button.

cd /root/.kde/Autostart

ln -s /opt/kde/bin/yakuake yakuake

Now when you restart the KDE, just press F12 to start a bash prompt.

l8r

werd1284
03-15-2006, 01:24 PM
Earlier I tried the inittab modification, however when I changed the 3 to 4, my BT wouldn't load up after that. I forgot what happened exactly, but I believe my splash would freeze and BT would stop loading. I ended up having to boot from the CD and altering the file back to 3. Weird, everyone else isn't having problems yet mine totally freezes when changing it. Otherwise my BT boots fine off the HDD at 3.

xatar
03-15-2006, 01:29 PM
did you install BT as a full installation or as a live cd install?

I don't think it works as a live cd install.

I don't know why it crashes tho!

HTSPilot
03-15-2006, 02:01 PM
I also added a softlink to yakuake to the Autostart directory... And now I will reboot seeing as my keyboard went wako on me and the keys got messed up.

Question though. How can I update my liveCD with all this. The Autostart shortcuts, the Atheros fix (svn, Kismet, Aircrack, madwifi), my modified etc.issue and other files. I looked up building modules, but it was rather confusing for me.

armedpilot
03-15-2006, 05:34 PM
I don't know if this is a typo or not, but you might want to comment out the following two lines too, if you're not ejecting the CD.

echo -ne "Press Enter to $command "
read junk

armedpilot
03-15-2006, 05:37 PM
Not sure it will work perfectly, but take a look at the dir2mo command.

Question though. How can I update my liveCD with all this. The Autostart shortcuts, the Atheros fix (svn, Kismet, Aircrack, madwifi), my modified etc.issue and other files. I looked up building modules, but it was rather confusing for me.

xatar
03-15-2006, 05:39 PM
Hi,

that was not a typo, my file is exactly as I showed it. However I do know that others have it like armedpilot showed.

Both work, my example will require you to press 'Enter' to either reboot or shutdown, armedpilot's example does not.

You decide.

l8r,

HTSPilot
03-15-2006, 05:55 PM
Yea I was looking at the FAQ, but Im a tad bit confused, to be honest. Because Im changing contents that are in the /base modules.

kimbell
03-15-2006, 11:11 PM
Question though. How can I update my liveCD with all this. The Autostart shortcuts, the Atheros fix (svn, Kismet, Aircrack, madwifi), my modified etc.issue and other files. I looked up building modules, but it was rather confusing for me.
This may do for you. I do not think it will be much diffrent with HDD install... I wonder if you can get it back into a cdrw? http://slax.linux-live.org/forum/viewtopic.php?t=6158&highlight=remaster

xatar
03-16-2006, 07:54 PM
I've been playing around with changing the CD files and remastering the ISO image.


Here's what I've got already...





Reboot a machine with BackTrack. Make sure that is has a writable drive with about 700MB of free space.

Log in as root, open a bash prompt and mount your writable drive.

mount /dev/hda1 /mnt/hda1

Create a directory in the mounted drive to hold all of the CD's contents.

mkdir /mnt/hda1/newiso

Check the following path, if it does not match exactly, alter it.

/mnt/live/mnt/hdb/*

It could be:

/mnt/live/mnt/hdc/*

Then copy the CD into the newiso directory.

cp -ra /mnt/live/mnt/hdc/* /mnt/hda1/newiso

(depending on the path above!)

This will take a couple of minutes.

cd /mnt/hda1/newiso/base



To autostart leetmode and yakuake:

cd /mnt/hda1/newiso/base

mkdir temproot

mo2dir root.mo temproot

cd temproot/root/.kde/Autostart

ln -s /usr/bin/leetmode leetmode
ln -s /opt/kde/bin/yakuake yakuake

cd /mnt/hda1/newiso/base/temproot

dir2mo root root.mo

cp root.mo /mnt/hda1/newiso/base/

Don't forget to remove the temproot directory and all of it's contents!

cd /mnt/hda1/newiso/base
rm -r temproot



To make the ISO image again.

cd /mnt/hda1/newiso

./make_iso.sh /mnt/hda1/newbacktrack.iso




Now you should have a new .iso file in /mnt/hda1. If you burn that to a CD AS AN ISO IMAGE! you should have the above changes all configured for you.

Do not try to change the inittab file as it screws up the boot process! Take my word for it :(






Although I am having problems with the new ISO image, it will not boot properly and crashes, then reboots.

Any help would be appreciated.

many thanks,

TheGreatVirus
03-16-2006, 08:27 PM
xatar: That would be quite useful if we could simply repack the OS onto a live cd. I have considered trying it myself but since your already on it. Have at it. =)

HTSPilot
03-16-2006, 10:34 PM
I think Im doing this right. Copied the contents of the CD to my HDD. mo2dir on etc and root and made my changes. dir2mo the modules back together, upload to my FTP so I can rebuild the ISO and reburn.

Now, as for the madwifi/aircrack/kismet patching, how could I implement that into the LiveCD?

Also, I have a custom splash.bmp for lilo, but there's no boot module. There is a /boot/splash.bmp.gz file, but I've no idea what that is.

Any other fixes I could implement?

sp1ff
03-17-2006, 02:49 PM
I want to change the default wallpaper. I tried to do it by creating a new Slax distro with MySlax creator (on Windows) using the BackTrack .iso as the baseline and adding modules and such. On the appropriate screen I entered the new wallpaper I wanted to use. However, when BackTrack boots, it displays that wallpaper for a moment and then the default BackTrack wallpaper takes over. I've tried copying the entire contents of the CD to the HD under an HD install of BackTrack (which works pretty well), did a mo2dir with the contents of the root.mo from the base directory, changed the wallpaper file that is in /root/.kde/share/wallpapers to the wallpaper I want, and then doing a dir2mo and making a new iso with ./make_iso.sh /tmp/new-slax.iso command. I got the default wallpaper anyway - it didn't work. Any clues?

I had a similar experience changing the default bootsplash graphic. I did essentially the same thing, doing a mo2dir with the etc.mo in the base directory, changing the bootsplash .jpg file at /etc/bootsplash/themes/Linux/images/bootsplash-1024x768.jpg to the .jpg graphic of the same size that I want to use instead, and then doing a dir2mo and making a new iso using that module instead. Same thing. The bootsplash didn't change for some reason.

I'm having trouble with the menus too. Whenever I use the menu editor tool with my HD install of BackTrack to add an app to the menu, when I save the menu it gets rid of the original BackTrack menu and puts all of the BackTrack apps in the Lost&Found menu. A bunch of apps that BackTrack did not have in the menu show up all of a sudden. I want to customized menu to go with the customized BackTrack distro that I'm creating for my own use. How do I do it and save it to the LiveCD distro?

I want to kill the KDE startup sound too, or at least change it to something less annoying. Still trying to figure that out.

And another thing, when I try to install a module to the HD installed version of BackTrack using uselivemod, I get an error that says / is not a valid union - can't insert module to union - error inserting module to live filesystem.

bones
03-24-2006, 03:09 AM
That mixer is rather nice. Cheers. I knew about the 'm' for Kismet, but Im sad because the 6000 comes with audio controls on the front (google some pics) but I also have the Fn functions, and none of them, save the wireless radio and screen brightness work. So I've no control over sound which is the biggest concern. I've yet to try my stand-by and hybernate buttons. *pause* Ok I just did and they dont work. The Fn number keypad doesnt work either. I'm lucky I have an LED battery indicator which flashes when the battery gets low else I wouldnt know when my battery's out of juice.

The FN keys and media buttons are controlled by dell's software which is for windows. It would be nice to get that functionallity.

My 6000's display is too bright and I am trying to figure out how to dim the screen with linux. Any ideas?

HTSPilot
03-27-2006, 04:38 AM
I still have basic hardware functionality with my 6000's Fn keys. I can control brightness and kill the wireless card. I can also use the "number pad" jkl, uio, 789 but I have no need for it.

ghowriter
04-14-2006, 05:24 AM
I have searched this and many other forums for info on customizing backtrack and/or the slackware running the system and I havent been able to find any help for my specific system so I am posting here in hopes that those more knowledgable than I can offer a little help in pointing me to the info I seek. (BTW: everyone here is likely more knowledgable than I, I do not normally use any version of Linux thus I am a newbie to the whole OS. I took a Linux class in college, an intro of sorts which covered very basic things.)

Anyway, here goes:

I installed BackTrack on the hard drive in a dual boot (I couldnt get the process described in these forums to work so I used the process exampled in my class text that was for FC4 and it worked perfectly and uses ntloader instead of lilo or grub).

When I load BackTrack from the hard drive I have to type dhcpcd into the terminal to initialize the laptop ethernet card every time, i would like this done automatically, however i cannot find a place to make it happen.

Next, I would like to include my system specific drivers to BackTrack because (1) the generic drivers are blah, and (2) a few devices do not get installed (wireless NIC for one) but I cannot find the driver files I need either because I dont know what they are or because I dont know where to look.

My laptop is an ACER 5002wLMI
1024M RAM (128 shared with video)
SiS m760gx video adapter
ac'97 realtek audio
SiS 900-Based PCI ethernet (installed and working)
Broadcom 802.11g wireless NIC (not installed)
Agere Systems AC'97 Modem (installed, i think)
Texas Instruments PCI-1410 CardBus Controller (I dont know if this is installed or not)

Any help would be greatly appreciated. Please keep in mind my limited knowledge of the Linux OS and know that I am willing and wanting to learn.

Thank you.

xatar
04-14-2006, 11:53 AM
simple way to auto enable dhcpcd:

cd /root/.kde/Autostart

ln -s /sbin/dhcpcd

That will start DHCP discovery on all interfaces when KDE starts.

As for the drivers? Don't know, I was lucky and my Tosh works perfectly with everything!

later,

armedpilot
04-14-2006, 03:14 PM
The best way to start dhcpcd at boot up, is to uncomment the lines (between the "for" and the "done", except for the two actual comment lines) in "/etc/rc.d/rc.inet1". That's how it's suppose to start. Try the "lspci" and "lsmod" commands, including "man"ing them to see if your hardware is being recognized, and if drivers are being loaded. Otherwise, do a google search for "linux <yourhardware>".

ghowriter
04-14-2006, 06:07 PM
Both methods worked for getting dhcp up and running on the SiS 900 NIC, thank you.

I did google the device's searching for drivers. I found some at for driver guide that claim are for linux, but upon opening the zip, i found windows ini files and this goes on. It would help if i could discern exactly what kind of broadcom is in this machine. Windows simply reports it as a broadcom 802.11g... not very helpful at all.

In my list, i forgot to list the software that isnt installed.

Video is, naturally.
Sound isnt.
Wired NIC is.
Wireless isnt.
Modem is.

Here's the kicker, lspci says all but the wireless NIC is installed. I disagree since i have no sound!! lol

okay, well, thanks for the help, i really do appreciate it.

killnine
05-08-2006, 04:10 PM
This is a sweet thread, very helpful. Thanks

ShD!nEx
05-11-2006, 06:37 AM
to stop the KDE Startsound just delete or rename

/opt/kde/share/sounds/KDE_Start_up_1.ogg

bgrimm
05-13-2006, 03:20 AM
What is the prefered method of updating installed packages on a Backtrack HDD Install. (Full install not livecd).

Is it okay to use #slapt-get --distro-upgrade and let it exclude/update/remove packages automatically?

Can I also use the --remove-obsolete option to clean up ok?

How about RPM package manager?

Example: NMap 4.03 was released as RPM binary
http://www.insecure.org/nmap/install/inst-linux.html#ex-nmap-install-from-rpms

I retrieved package as instructed but how to I install/replace the existing nmap install/package (4.00) ?


-bg

ashtar5
05-04-2008, 10:52 PM
I had fun changing the login screen. I just wanted a black screen with the cursor blinking and "hostname login" printed. That way it doesn't scream "backtrack!" ..lol.. Anyways, I found it by going into /etc and doing grep -H toor *(this will find the file that says login with username root and password toor, so we know where to edit). I just deleted everything in that file.

P.S. How do I change the backtrack 2 background in KDE? The dragon is sweet, but not very discrete.

archangel.amael
05-04-2008, 11:29 PM
I had fun changing the login screen. I just wanted a black screen with the cursor blinking and "hostname login" printed. That way it doesn't scream "backtrack!" ..lol.. Anyways, I found it by going into /etc and doing grep -H toor *(this will find the file that says login with username root and password toor, so we know where to edit). I just deleted everything in that file.

P.S. How do I change the backtrack 2 background in KDE? The dragon is sweet, but not very discrete.


On the desktop right click with the mouse and choose configure desktop.

ashtar5
05-05-2008, 01:02 AM
Doh. Alright, thanks.

I have some questions about users and groups. What's the best / most secure way of setting up your users under BT linux? So far, I've added a user with adduser and logged in successfully. The kde menu is totally different though, so that would be my first question: How do I get my non root user account's kde desktop to be the same as root's? Second question... Once logged in as a non root user, I am unable to run commands as root using sudo; ie sudo shutdown --now . I get prompted for a password, I enter my root pw, but it's not accepted. What am I doing wrong? Third, fourth and fifth questions: When examining the passwd and group files in /etc, there are all sorts of entries I don't understand. For example, what are the operator and nobody users used for? To which group should I be assigned? I am in the group users, what would be a scenario in which I would need to create a user under the group ftp, nogroup, pop, etc?

pureh@te
05-05-2008, 07:25 AM
Doh. Alright, thanks.

I have some questions about users and groups. What's the best / most secure way of setting up your users under BT linux? So far, I've added a user with adduser and logged in successfully. The kde menu is totally different though, so that would be my first question: How do I get my non root user account's kde desktop to be the same as root's? Second question... Once logged in as a non root user, I am unable to run commands as root using sudo; ie sudo shutdown --now . I get prompted for a password, I enter my root pw, but it's not accepted. What am I doing wrong? Third, fourth and fifth questions: When examining the passwd and group files in /etc, there are all sorts of entries I don't understand. For example, what are the operator and nobody users used for? To which group should I be assigned? I am in the group users, what would be a scenario in which I would need to create a user under the group ftp, nogroup, pop, etc?
1. I don't know the exact answer but I know it has been asked and answered on the forums a few times before so a little searching will probably yield the answer. If it were me I would try to figure out where in the "root" directory there was a KDE menu .config and the import that into /home/(your directory). I'm not sure if its that easy with kde but I bet it is.

2. This has to do with what groups your user belongs to. In order to run commands as root your user must be part of the wheel group. try this instead...
bt~# su -
password:
that should switch you to root.

3. Groups and group permissions are basic linux. You should probably ask these questions in a more basic linux forum.

archangel.amael
05-05-2008, 10:23 PM
A good bit of reading on the basic linux file structures and how linux operates would be some good bit of reading to do my man! This will serve you better later one. :)

camelel
05-07-2008, 12:43 PM
Hello!
I've got a running BT3 with compiz, but there's a command i must run in order to have windows title bars (minimize,maximize buttons etc...) so I've created a file called startnvidia.sh:
#!/bin/bash
exec /usr/bin/X11/nvidia-xconfig -d 24
then i did ln -s startnvidia.sh ~/.kde/Autostart/

but when i log into X after restart it's still not running the script.
although i've noticed that when i'm ending kde's session just before i get the login request i see that the script has been executed - when i ended the session rather than started it.
after running the command manually compiz works smoothly.

got any idea about it?

thanks!