Click to See Complete Forum and Search --> : Changing SMB.conf file
Johnisdad
10-20-2002, 08:55 AM
I have been a Windows man for 20 years and I am trying to learn Linux Mandrake 8.0. I understand I need to edit the SMB.conf file so I can talk to my Windows network. I can't edit the file without root access. How do I log in as root? I have a root password, but don't understand what I hve to do to edit the file. Thanks for your help.
John
cowanrl
10-20-2002, 09:21 AM
For security reasons you're always better off to log in as a non-root user as you are doing. Then when you want to so something that requires root priveleges, you open a terminal window(if you are using a GUI) and then enter this command:
su -
It will prompt you for the root password. Once you enter it, you now have root priveleges for whatever you do within that terminal window.
You type exit at the command line to exit being root.
There are many ways you could edit your smb.conf file once you have a terminal window open and have changed to root. 2 popular command line editors are vi and pico. To use either one, you would just enter vi /etc/samba/smb.conf or pico /etc/samba/smb.conf. vi is similar to the old DOS edlin, I'm sure you remember that. I use it because it's simple.
If I want to use a GUI text editor because I want to do some cut/copy/paste I use a program called gedit. I just enter:
gedit /etc/samba/smb.conf
from the command line and it opens up the GUI text editor with the file in it.
If you're new to Samba, do a search on this site on the word Samba over the last 3 or 6 months. You'll come up with hundreds of hits I'm sure. It's a subject that's well documented on this site. There is a Newbieized Help File on it but it's a little out of date. It tells you to disable encrypted passwords on the Windows machines which is a no-no as far as I'm concerned. The example file also is for making your Samba server a PDC, which is more than most people need when getting started.
Hope this helps.
cage47
10-20-2002, 09:45 AM
another alternative is if you have KDE installed look in your menu for applications->file utilities->for file manager (superuser mode)
This is Konqueror invoked as root (superuser). It will also prompt you for your root password. Then go to the /etc/smb.conf (I think it's just /etc/smb.conf in Mandrake 8.0, if I remember correctly. I know it's /etc/samba/smb.conf in 8.2) file. right click on it and open it with one of the text editors you have installed. Then again you could use swat (if it's installed) Personally I installed my samba by looking down through the supplied smb.conf file and editing it to your settings.
If you have swat installed and running, since you are a windows guy, that will provide you with a gui interface for editing the smb.com file. To load swat open a web browser and in the url field type https://localhost:901/ . I believe you will have to be root to do this?