General :: Create System And Samba Users With A Script?
Jan 7, 2010
I need to add linux and samba users using a shell script, it falls over because you are prompted to set a password.
I had a similar problem when installing the samba package using a script because it asks for confirmation after the command, I got round it using --force-yes -y as below.
apt-get install samba smbfs swat --force-yes -y
I suspect and hope you can do something along those lines when creating a linux user and a samba user, something like
i am reading on sendmail and so far my impression is, we must create users on the system (where sendmail is installed) for them to be able to access their emails. I wanted to ask that is it possible to create users for email only and not on the system ? Like lets say i want to create a user client named noony, who gets and sends his email to my sendmail server, but i dont want to actually create the user on my system ?
I want to use samba in ubuntu.For samba users i make a user in my linux box like
# useradd smith # useradd jone
These users can also login into my ubuntu system if they want. For samba I want to know that, is there any way to create separate valid list of samba users so that they may access files from windows xp.
I've got a small issue that when a Windows user creates a new folder through Windows Explorer (from the menu or by right clicking) the new folder is only accessible to that particular user. Example: user SABKAR (member of the HR group) creates a new folder called MarcTestMenu in a shared Samba directory through Windows Explorer:
[Code]....
At this point user MORAMY cannot copy a file or open the directory MarcTestMenu. MORAMY gets a 'not accessible' error message in Windows. If I su to the Samba box and issue this command:
[Code]...
how I can get the correct default permissions when users create directories through Windows?
Is there any way to limit x number of samba users by samba ? Say if there are already 5 samba users using the share, I would like to restrict any futher samba requests.. How do i do that ?
I have a Samba File Server that can authenticate users in my Windows AD to log into the server. Anyways, I have a good amount of Windows Admins on staff but our org wants to cut budget so our first "slash" as it were is cutting down the actual Windows based File Servers.So my question is, now that I have this test server up and authenticating for logins using Windbind....is there a way I can get system-config-samba to "see" winbind users and groups so that file servers can still be "point and click" for my Windows Admins?
Don't worry, I know - that title probably makes this question seem way more complicated than it actually is. Here's the situation: I have a server running SLES10 with a samba share set up on it. I created a username in Samba and Linux for myself, can access the share, permissions are fine, yadda yadda. Now I want to give about 100 more people access to it.
I have active directory running which users log into and I'd like them to be able to use their active directory passwords to authenticate to the share, rather than have me create 100 individual Samba/Linux accounts. In the future the AD server will be changing over to server 2008 but I'll cross that bridge when I get there. It would be equally effective if I could pull AD passwords from AD and "auto-create" the associated Linux/Samba users. Any ideas or could someone point in the right direction?
I work as an system administrator for AIX and Linux servers. We have an FTP server running in Linux which has shared folders to Windows domain using Samba. The new requirement is to map users created to Linux machine to Windows users in such a way that, when a user logins into Windows machine with an ID say "X123" in domain "TEST", his access control to the samba shares should reflect based on the same user ID created in Linux machine.(FYI. Both the Windows and LINUX machines are in same network and domain). Please let me know the step by step procedure to configure Linux machine (smb.conf entries or any new file to be created for user mapping) to identify Windows user Login and provide access restrictions accordingly.
At my office we are having a samba sever, staff will access their respective folder from their Windows XP systems. I wish to track all user access activity like file creation, modification, deletion and etc. I tried smbstatus -v, from the output I am not able to guess what the user done. I am giving some of the results I get please help me or you can suggest best way to get access log.
Samba version 3.0.25b-0.el5.4 PID Username Group Machine 14721 govind govind tsl-019 (10.0.2.64) 4832 chandra chandra trivent-9b92c9c (10.0.2.106) Service pid machine Connected at
All of sudden a working SAMBA server not allowing to login and deny permission for users to access it shares. When I check I checked the server directory rights are same, find no changes. and smb.conf is also same. when I checked closely I found the following error.
1. smbd.log show the following messages
[2011/06/14 16:07:15, 0] lib/util_sock.c:get_peer_addr(1232) getpeername failed. Error was Transport endpoint is not connected [2011/06/14 16:07:15, 0] lib/util_sock.c:read_data(540) read_data: read failure for 4 bytes to client 0.0.0.0. Error = Connection reset by peer [2011/06/14 16:07:36, 0] lib/util_sock.c:get_peer_addr(1232) getpeername failed. Error was Transport endpoint is not connected [2011/06/14 16:07:36, 0] lib/util_sock.c:get_peer_addr(1232)
If I want to add Windows & Mac users as Samba users, must I first add them all as Ubuntu users? If so, since none of the other users will actually be working on the Ubuntu Server, how do I disable the other non-admin users on the Ubuntu Server login screen. I am using Webmin to administer some server settings, and command line for others.
I have configured ldap on Debian5 and samba on another machine, all servers are running ok, but when i try to add users, it gives me an errror that "unknown user"
i have to create 100 users in Linux with some password can it be done in one go i tried newuser command but the home directory is not created for those users.
plus when i login for the first time into a server i got EXECUTING /etc/profile ... EXECUTING .profile ... EXECUTING /xyz/abc/bin/setenv.ksh file ...
before the prompt. The above three lines shows that some kind of script was set to run when a user login for the first time that will create the home directory (if i am not guessing wrong)and never run if user login again.
I just loaded a new server. I did an adduser with the -c and -p to create a few new users. The users show up in /etc/passwd, but when i try to SSH to the server as them I get access denied.
Is there somewhere I have to add their names to allow them to SSH in? they have /bin/bash as their shell accord to passwd.
want to made 2 users in samba by which windows machine we access share, say user1 has read,execute permission, user2 has read write delete update full permission. we have done user1 configuration as premia user. we need your guideline for user2
we change the smb.conf file # less /etc/samba/smb.conf [global]
i've been wondering how do i know if some users create/modify/delete file/directory in linux, i've been using pyinotify in python script.this script like the example from the manual:
Code: #!/usr/bin/python import pyinotify, os, time
If i create a samba share to one of my lost+found folders so i can copy stuff to somewhere else, will that cause a problem? I'm thinking not, but since its a special folder wanted to make sure.
Would like to know what command can be used to check for other user accounts on my system. Note, not presently logged in users like whocommand just a command to know other users?
I'm trying to send mail to other users on the same host, but they don't arrive.I've tried using mail and alpine. Both programs apparently work fine, in that they behave as expected and apparently send the email.But when logging in as the recipient, there is no mail in /var/spool/mail, and nothing in alpine INBOX
Can anybody help with with shell scripting.I need a script to display all users in system.i know there are commands to display all users but i need a script for that.hope someone can share the script.
I need to customize linux kernel root file system for embedded linux system. During compile time, for root file system I am able to create different user/group ex: "gnumuzic/Muzic". But I want to give access to group "Muzic" to some folders like /dev/nexig during compile time.
I want to make a webserver with multiple users allowed to login through SFTP to a specific folder, www.Multiple users are added, lets say user1 and user2, and all of them belonging to the www-data group. The www directory has an owner www-data and a group www-data.
I have used chmod -R 775 on the www folder, but after I try to create a folder test through my SFTP server (using Filezilla) the group of the directory created has only r and x permissions, and I am not able to log in with the second user user2 and create a directory within www/test due to a lack of w permission to the group.
I also tried using chmod 2775 on www directory, but without luck. Can somebody explain to me, how can I make it so that a newly created directory inherits the root directory group permissions?
I've done all this config [URL] This config for the "foo" folder:
("pruebas" its a user)
Code:
[foo] path = /home/pruebas ready only = no guest ok = yes
[code]....
I have the [HOME] code too, its everything fine with it, and I cant connect with another user ("alfredo") from Red Hat to Windows XP with no problem... but as soon as I double click in "foo" directory, appears this:
[URL]
Already tried to disconnect from windows the directories with "net use" but it doesn't work