I've been asked to determine the absolute minimum attributes for Samba accounts on AIX. For instance, setting the local account shell to /bin/false in order to prevent shell access. That's feasible. I can even set the /home directory to something other than /home/service/$USER or /home/$USER because, from what I gather, it is impossible to actually create a local account without a /home directory on AIX.

But, what about Samba? Is it possible to create a Samba user without creating its home directory?

  • Short answer is yes. – Tigger Apr 25 '17 at 7:03
  • It might help if you could clarify a few points of your question. Also note that this is not really specifically an AIX question, more of a general unix & linux or actually more of a samba question. Basically you can just add a line in /etc/passwd and then set a password for that user and you have a new user account, and then then create a samba "user account" for it with smbpasswd. Although that will not result in an actually complete user account technically, but you would have a user account and a matching samba user, as a samba user is actually only an entry in the smbpasswd file. – doktor5000 Apr 26 '17 at 6:43
  • @doktor5000 It is possible to create a Unix user without a home directory: simply provide the -M option. With Samba, it isn't clear to me how to set such an option to ensure that the user does not have a home directory; Or if this is even possible. Does Samba require a home directory for its users? – theillien Apr 26 '17 at 20:34
  • @theillien Not sure which command you're referring to, mkuser does not support -M nor does useradd (which is just a basic wrapper around mkuser). Seems to me there's a basic understanding problem, a samba user is basically just an entry in smpasswd file, which maps this samba "user" to an actual unix user. Hence the only thing that samba requires is an existing unix user. And a unix user does not require a home folder, as it's only an entry in /etc/passwd. – doktor5000 Apr 27 '17 at 6:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.