Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
You have to type the name of the program into a virtual terminal with root privileges, see mannmaniyar above. Most programs are in /bin, /usr/bin, /sbin, /usr/sbin. If you don't know the actual command name, put the icon on the desktop, right click the icon, click properties, and click executable
I'm trying to enable samba but the program is all grayed out when I run it. I assume its cause I'm not logged in as root. How do I run it as root? I'm using Debian and I can't actually log in as root.
What program? Which distro are you using?
To launch a gui program as root, use "kdesu" in KDE, or gnomesu in Gnome. This will also allow root access to your screen. However, admin programs launched from the menu will prompt you for the root password so this may not be necessary.
Are you trying to configure samba or have the service enabled?
echo $DISPLAY # you'll be needing this value 3 lines below
sudo -i # or "su -" on older Slackwares
xauth merge ~alien/.Xauthority # use your own username here instead of "alien"
export DISPLAY=:0.0 # use the value of DISPLAY you've seen 3 lines before
Alternatively, you can run the following two commands which will give you the same end result:
sudo -s # a side effect of '-s' is that it allows root to run X programs
. /etc/profile # sourcing the global profile ensures
# that root has the ''sbin'' directories in the $PATH
This one is actually pretty easy. In a terminal here is what you do:
Anywhere you see ## just after that is instructions you do NOT have to type the text directly AFTER the ## signs,
what you have to type will either be BEFORE the ## on a line or the line will have NO ## signs.
##first type in:
##after you hit enter you will see
Password: ##<----------- type in your root password here.
##Now you will see your prompt change from a $ to a # sign
##Don't worry, almost done now...
ln -s /usr/lib/kde4/libexec/kdesu /usr/bin/kdesu
##hit enter, then type:
##You are now back to your regular user in your terminal. Lets test that puppy out!
##The normal kdesu dialog should pop up asking for roots password with the explanation that the program
##dolphin needs root permissions. You can just cancel the dialog box since it was only a test to see if the link
You can press ALT-F2 and then enter "kdesu <program name>". If that doesn't work in other distros, I wasn't aware of it.
kdesu & gnomesu differ from sudo in that it handles xauth cookies so that the root user has access to the display. A GUI program needs that.
In case it helps, here is a bit of my smb.conf file, which basically allows read/write access.
workgroup = workgroup
security = share
encrypt password = yes
smb passwd file = /etc/samba/smbpasswd
show add printer wizard = No
wins support = no
path = /home/[username]/[some directory]
guest ok = yes
read only = no
available = yes
browsable = yes
public = yes
writable = yes
Remember that, in addition to configuring Samba, the directories you wish to share must also have their file permissions set to allow sharing; you can do this by going the directories and setting the properties in your file manager.
where do I run kdesu? I tried it in a terminal and got command not found.
You can get a kdesu command as discribed at post #9
Also you can add some tools to KDE Menu to run them as root.
No need to launch everytime konsole and no need to type a bunch of letters
Just click menu item:
Rather than kdesu, try using gksu. Since Debian generally runs Gnome, it's likely that it has gksu. gksu is a command launcher for running programs as root. If gksu is not installed on your system, then simply install it (IE, "apt-get install gksu"), and then you can use it. Just press Alt-F2, enter "gksu", and then within the gksu launcher, enter the name of the program you wish to run as root.