Jump to content

Creating an email only user account


Guest Ralgha
 Share

Recommended Posts

Guest Ralgha

Forgive me if this is the wrong forum, but I couldn't find one that fit better.

 

How would one create an email only account? Is it as simple as setting the shell to /bin/false?

 

What would I set the home directory to? /dev/null?

 

Thanks.

Link to comment
Share on other sites

Forgive me if this is the wrong forum, but I couldn't find one that fit better.

 

How would one create an email only account?  Is it as simple as setting the shell to /bin/false?

or to /bin/true

or maybe even to /sbin/nologin

What would I set the home directory to?  /dev/null?

Nope, that will rise an error since /dev/null is a file, not a directory. What about /var/spool/mail

You don't need to care at all since you won't allow logins from that user. Another idea could be to create a /home/nologin directory owned by root w/o w permissions for group/others

 

I'm not an expert, but I'd do something like this:

~# useradd -M -d '/var/spool/mail' -s /bin/false USERNAME

 

Probably you'll need to add /bin/false to the list of shells on /etc/shells. Also, it would be a good idea to create a "mailonly" group and put inside all those users.

 

I don't know if you should add a password for that kind of user or not, probably yes.

 

Btw, if I'm not wrong, some mail servers can do the task of setting mail only users for you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...