LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux File Server Permissions issue- ULTRA Newb needs help! (https://www.linuxquestions.org/questions/linux-newbie-8/linux-file-server-permissions-issue-ultra-newb-needs-help-637277/)

shiftdelete 04-23-2008 07:46 AM

Linux File Server Permissions issue- ULTRA Newb needs help!
 
First off- I know next to nothing about linux, except linux web servers with Cpanel / WHM, and how to connect with Putty via SSH.

I recently joined a company that has a linux file server. This server is running Gentoo, and uses Samba to establish permissions from our Windows-based Active Directory.

Some users are having trouble accessing some of the shared folders. I believe the previous guy (very much a linux guy, but extremely backwards in the ways of setting things up), established all permissions based on individual Users instead of Groups.

Here is where I need help- I need to figure out the commands to browse directories, as well as "get into" samba, and reset permissions. So, if someone could list some of these commands as a reference, or link to a site that has these in detail, that would be awesome.

I know a user that has the Correct permissions, so I'd like to find a way to VIEW those, and then a way to apply those on other users.

Again, I can login via SSH as root (scary, huh?), but I have no knowledge of what to do from there. I can ask around and the share name of the folders, but I still don't know how to "browse" directory tree listings to find them on the drive. There is no GUI on the system, this is SSH commands only.

So, any help would be VERY much appreciated.

Thanks,

Shiftdelete

Fergatron 04-23-2008 07:54 AM

I'm not a network guru by no means, but how about Samba's HOWTO page: http://wiki.samba.org/index.php/Main_Page#HowTos. I also found this:

shiftdelete 04-23-2008 08:10 AM

Thanks, I read through most of it, but it really doesn't say much about those basic commands.

I also had an idea-- If this Server has no GUI, is it possible to install one to make this easier?

Any further help would be appreciated.

shiftdelete 04-23-2008 11:23 AM

Any other suggestions? or can someone provide a list of basic Samba / LINUX commands?

Or inform me if installing a GUI on gentoo linux is a better idea?

Thanks in advance.

IsaacKuo 04-23-2008 11:40 AM

The only Samba command you'll probably need is the one to start/stop/restart it. I'm not familiar with how those are done in Gentoo. Practically everything else you will ever do with Samba is to modify /etc/samba/smb.conf. You can edit it using:

vi /etc/samba/smb.conf

...assuming you know how to use vi (if you have to ask, you don't). I don't know what other text editors are on your Gentoo system; probably at least "pico", which is easier to use, at least.

So typically, you will edit smb.conf and then restart the samba daemon so your changes "take effect". Make sure to copy the file before making changes in case you mess things up.

If you're familiar with DOS commands, some of the basics are:

cd == cd (use "/" slashes instead of "\" slashes)
dir -> ls -l (the -l option gives you a long listing including file permissions)
copy -> cp
erase -> rm

As you can tell, the original developers of Unix were very lazy typists.

If you need to change the actual permissions on the files, then you're going to have to get friendly with the commands "chmod" and "chown". Do some www searches for tutorials on how to use them. Unix file permissions are flexible and complex.

jei 04-23-2008 11:59 AM

Installing a gui won't offer much assistance when dealing with smb, However it would allow you to manage shares through a graphical point and click means.

Some basic commands for managing users and groups.

adduser (adds a new user to the system)
deluser (deletes user)
passwd username (changes or adds a password for user)
groupadd groupname (adds a new group)
groupdel groupname (deletes group)
useradd username groupname (adds a user to a group)

--- Taken from oreilly.com ----

7.1.4.4 Removing a member from a group

Unfortunately, no command removes a user from a specified group. The easiest way to remove a member from a group is by editing the /etc/group file. Here's an excerpt from a typical /etc/group file:

users:x:100:
nogroup:x:65534:
bmccarty:x:1000:
newbies:x:1002:newbie01,newbie02,newbie03

Each line in the file describes a single group and has the same form as other lines, consisting of a series of fields separated by colons (:). The fields are:

Group name

The name of the group.
Password

The encrypted password associated with the group. This field is not generally used, containing an x instead.
Group ID

The unique numeric ID associated with the group.
Member list

A list of user accounts, with a comma (,) separating each user account from the next.

To remove a member from a group, first create a backup copy of the /etc/group file:

cp /etc/group /etc/group.SAVE

The backup can prove helpful if you modify the file incorrectly. Next, open the /etc/group file in a text editor. Locate the line that describes the group and delete the user name and the following comma, if any. Save the file, exit the editor, and check your work.

---Taken from oreilly.com END -------

you may also be able to use smbstatus to show what shares are available and who is accessing them. However, this is not always installed.

Here is a link to the oreilly.com book the section above is pasted from
http://www.oreilly.com/catalog/debia...k/ch07_01.html

Jei

chrism01 04-23-2008 06:28 PM

If you are that new to Linux, here are some worthwhile tutorials etc:
http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/
http://linux.oneandoneis2.org/LNW.htm

given its a free OS, maybe you should consider dual booting at home to get extra practice etc.

marquardl 04-23-2008 07:12 PM

learn the basics
 
If you have to manage the server remotely and want to do it with a graphical interface, then you should install a vncserver and a client on your local PC. This way you can login to X Windows on the server, if it is installed at all.

If the server is at your location, than rather seat yourself in front of it. Other than that, SSH allows the same commands you would use on a terminal. Your problem is not SSH, but missing experience with the UNIX shell (most likely Bash). As such you should study the basics before tampering with a production environment.

Editing /etc/samba/smb.conf and using "useradd username groupname (adds a user to a group)" statements could solve your problem. Or simply made those shared directories world-writeable by using 'chmod a+w directory-name' on the command-line/SSH. Not a secure solution.


Server issues


All times are GMT -5. The time now is 08:01 PM.