On Feb 18, 2004, at 1:30 PM, Kevin Willis wrote:
I tried editing the smb.conf file in the terminal to allow
printer sharing, but I don't have permission to do so. I am the only
one that uses the G4 and I am the one that installed Jag on it. I
always use the same password, but it doesn't work when trying to log
in as root.
I managed to copy smb.conf to my home directory and uncomment
the printer section. But now I can't copy the edited file back to the
/etc directory. Any thoughts on a possible work around?
To edit the smb.conf file from within your Terminal, you will need temporary root privileges. You can get this with the sudo command. As an admin user, by default you are allowed to use sudo in OS X. (Note to Unix experts reading this: by default the admin group is in the sudoers file with privileges %admin ALL=(ALL) ALL .) So, if you use the pico editor, the command to edit smb.conf is:
sudo pico /etc/smb.conf
After you enter this command, you will be asked for your password. This is your ordinary admin user password, not the root password.
Pico is a very easy-to-use editor. Also included with OS X are vi and emacs, if you know or prefer those text editors, but for beginners I'd recommend pico, as it includes all the control-key commands in a handy menu at the bottom. Actually, it is even possible to use TextEdit in the GUI, although to do that you'd need to be able to see /etc in the Finder, which by default you can't, and I'm already getting off on too many tangents.
The root password is separate from your admin user password, since the root user is a separate user. By default, OS X does not even enable the root user, so trying to log in as root before enabling the root user is pointless. If you wish to enable the root user, simply open up your Terminal and type the following:
sudo passwd root
You will be asked for your admin password, enter it. Then you will be asked for a new root password, twice. Enter it, and make very very sure that you remember it, and that it is difficult to guess. Don't use your spouse's name, or "password", or even anything found in a dictionary. The reason Apple doesn't enable root by default is that you can do anything you wish using sudo, which logs usage. Enabling root decreases the security of your computer somewhat, so think carefully about whether you really need it.
If you wish to copy an smb.conf file that is in your home directory (for example) to the /etc directory, the command is
sudo cp ~/smb.conf /etc/
But then it may have the wrong permissions. To fix the permissions on the newly copied smb.conf file, enter
sudo chmod 644 /etc/smb.conf
(that last step may or may not be necessary, but it is best to be sure.)
If you have any specific questions about this, ask, I'll do what I can to help.
Lord Clark Frazier Hale I,
OS X, although based on BSD and having many NetBSD commands in it, also has some important differences. For example, although the fstab file exists, it is not used at all in OS X 10.3 Panther, and even in Jaguar and previous versions cannot be used in the same way as it can in BSD. /etc/master.passwd is only consulted in single user mode. In normal usage and by default, lookupd gets its information from NetInfo. In fact, much of the plumbing of the operating system uses the NetInfo database, not the Unix flat files. If you are interested in OS X, O'Reilly has a great book that you may be interested in, Mac OS X Panther for Unix Geeks: http://www.oreilly.com/catalog/mpantherunix/
Trevor
-- 1st-PowerMacs is sponsored by <http://lowendmac.com/> and...
Small Dog Electronics http://www.smalldog.com | Refurbished Drives | -- Sonnet & PowerLogix Upgrades - start at $169 | & CDRWs on Sale! |
Support Low End Mac <http://lowendmac.com/lists/support.html>
1st PowerMacs list info: <http://lowendmac.com/lists/1st-powermacs.shtml> --> AOL users, remove "mailto:" Send list messages to: <mailto:[EMAIL PROTECTED]> To unsubscribe, email: <mailto:[EMAIL PROTECTED]> For digest mode, email: <mailto:[EMAIL PROTECTED]> Subscription questions: <mailto:[EMAIL PROTECTED]> List archive: <http://mail.maclaunch.com/lists/1st-powermacs/>
---------------------------------------------------------------
The Think Different Store
http://www.ThinkDifferentStore.com ---------------------------------------------------------------
