Linux - Newbie This 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! |
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-20-2008, 01:43 AM
|
#1
|
Member
Registered: Nov 2008
Posts: 91
Rep:
|
samba user authentication
Hai all i have a setup a samba server and accessing the samba share from by windows xp machine....i have given the share 'doc1' folder with 777(permission) and 'doc' folder also with 777...And i have assigned user authentication for the folders ...The configuration file is as below...Both the shares are working perfectly..Problem is for the first time when i try to access the share from my windows machine(\\samba machine ip addr) it tells connecting to 'samba server name' prompting for user name and password i gave one of the user name say 'prasanna',it got in displaying both the folders...As per my configuration file samba user prasanna(in this case) should not be able able to access 'doc' folder...I tried to access the doc1 folder thinking that it will give me a error message like 'access denied' but it again prompted me for the usrname and password i gave the username as prasanna and its relevant password but it is neither logging in nor displaying error...it justs sticks to that screen...
The thing what i found was only a user is able to access his assigned resource in windows xp..even when he tries to access a folder that is not assigned to him he is not shown any error message but provided with user authentication prompt that is of no use.. I am very new to linux ..nay little help is greatly appreciated...Thanks in advance.......
[doc]
comment = Public Stuff
path = /doc/
#public = yes
writable = yes
valid users = yousuff,prasanna
guest ok = no
[doc1]
comment = Public Stuff
path = /doc1/
#public = yes
writable = yes
valid users = yousuff
guest ok = yes
|
|
|
12-20-2008, 06:40 PM
|
#2
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Rep: 
|
Have you created samba accounts for the XP users on the samba server? This can be done by root as follows. Open a terminal window.
If the samba server is on Debian, Ubuntu or any distro which uses sudo, type
sudo smbpasswd -a username <Enter> You will then be prompted for the root password and then the password to assign to the username. If username is the same as the user's name on XP and the password is also the same - it will not be necessary for the user to enter them when connecting to the samba server.
If the samba server is on Red Hat, Fedora, CentOS or another Linux which uses su, do the following. Type su - <Enter> then enter the password for root. The smbpasswd command is the same - just omit sudo.
As to the permissions on the samba shares... If this samba server is just for fun and not in a production environment - I would probably create a matching Linux account for each XP user then control access to the folders from within Linux using user and group permissions. Controlling user by user permissions within the smb.conf file would be rather cumbersome. If nothing else your would have to restart the samba services each time you made a change - thus disconnecting anyone accessing the samba server at that time.
See if this helps to accomplish what you are trying to do. If not, please feel free to ask more questions.
Ken
p.s. Make sure your firewall on XP allows connections to the samba server. When I first started to use samba some years ago I installed it and made a couple of configuration changes and it WORKED!!! I was quite pleased. Then a few days later it stopped. I spent more than 6 months on and off messing with it - I unstalled an ftp server and used that to move files between XP an Linux. Finally I found that an upgrade to the Zone Alarm firewall program decided to protect the XP PC from other PCs in its workgroup. By then I had upgraded samba, uninstalled and reinstalled samba, reinstalled Linux etc. All to no effect :-(
|
|
|
12-26-2008, 11:40 PM
|
#3
|
Member
Registered: Nov 2008
Posts: 91
Original Poster
Rep:
|
Quote:
Originally Posted by taylorkh
Have you created samba accounts for the XP users on the samba server? This can be done by root as follows. Open a terminal window.
If the samba server is on Debian, Ubuntu or any distro which uses sudo, type
sudo smbpasswd -a username <Enter> You will then be prompted for the root password and then the password to assign to the username. If username is the same as the user's name on XP and the password is also the same - it will not be necessary for the user to enter them when connecting to the samba server.
If the samba server is on Red Hat, Fedora, CentOS or another Linux which uses su, do the following. Type su - <Enter> then enter the password for root. The smbpasswd command is the same - just omit sudo.
As to the permissions on the samba shares... If this samba server is just for fun and not in a production environment - I would probably create a matching Linux account for each XP user then control access to the folders from within Linux using user and group permissions. Controlling user by user permissions within the smb.conf file would be rather cumbersome. If nothing else your would have to restart the samba services each time you made a change - thus disconnecting anyone accessing the samba server at that time.
See if this helps to accomplish what you are trying to do. If not, please feel free to ask more questions.
Ken
p.s. Make sure your firewall on XP allows connections to the samba server. When I first started to use samba some years ago I installed it and made a couple of configuration changes and it WORKED!!! I was quite pleased. Then a few days later it stopped. I spent more than 6 months on and off messing with it - I unstalled an ftp server and used that to move files between XP an Linux. Finally I found that an upgrade to the Zone Alarm firewall program decided to protect the XP PC from other PCs in its workgroup. By then I had upgraded samba, uninstalled and reinstalled samba, reinstalled Linux etc. All to no effect :-(
|
Hi Ken,
My problem has been sorted out.But each time i need to run this command in xp machine for it to check for authentication when trying to access samba share.(or else the user with which i first logged in samba share folder will be displayed until the window xp system reboot)..
Cmd 1.go to command prompt type net use and then enter
2.It displays the existing share connection
3.delete the connection by using the parameter /delete
C:\> net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK \\192.170.50.33\IPC$ Microsoft Windows Network
The command completed successfully.
And i deleted using the following command
C:\> net use \\192.170.50.33\IPC$ /delete
\\192.170.50.33\IPC$ was deleted successfully.
Now when i try to access the samba machine it prompts for the samba username and password.
Hope this information is useful.
Last edited by fizeelinux; 12-26-2008 at 11:42 PM.
|
|
|
12-26-2008, 11:54 PM
|
#4
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep: 
|
Isn't the root cause of the wrong user being able to see the second share that you've got
guest OK = yes
?
Try changing that to "no"
|
|
|
All times are GMT -5. The time now is 12:36 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|