Koozali.org: home of the SME Server

Rename admin account

Offline CmdLn

  • ***
  • 57
  • +0/-0
Rename admin account
« on: March 28, 2014, 04:55:19 PM »
I need to rename the admin account to something like smeadmin so that I can use admin as a standard account specifically for email. I am installing SME 8 as a replacement for RedHat and we already use the email address admin@ourdomain.com for receiving email for the admin department for a few years now.

I see I am not the first person who wants this and I looked into doing it myself but there are just too many files to change.

/etc/passwd, /etc/shadow, /etc/group, /etc/gshadow and a lot of files in /etc/e-smith/tests and /etc/services to name just a few. Has anybody done this before? It would be really useful to a lot of people I think.

I am really stuck here and at the very least need to be able redirect mail for admin to another user, but obviously don't want to receive system related stuff on that account.

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Rename admin account
« Reply #1 on: March 28, 2014, 08:16:54 PM »
--
qui scribit bis legit

Offline CmdLn

  • ***
  • 57
  • +0/-0
Re: Rename admin account
« Reply #2 on: March 29, 2014, 07:30:20 AM »
Thanks Terry, but that's a temporary solution and the new virtual domain user receives system email. I was hoping somebody had a perminent solution to this problem.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Rename admin account
« Reply #3 on: March 29, 2014, 01:56:13 PM »
Thanks Terry, but that's a temporary solution and the new virtual domain user receives system email. I was hoping somebody had a perminent solution to this problem.

AFAIK there's NO solution to this "problem".. it's so by design.. you should/could file a bug/NFR in bugzilla

Offline idp_qbn

  • *****
  • 347
  • +0/-0
Re: Rename admin account
« Reply #4 on: March 29, 2014, 08:15:20 PM »
Why not just change the Admin department's email address? The department probably isn't called Admin, anyway - most likely Administration.

People and organisations routinely change email addresses, tell the clients/friends and after a little while things settle down and the world does not come to an end.

There does not always have to be a techno-fix for every human problem.

When you start fiddling with the internal workings of a server (any server,not just SME) then you are striking out into the wilds of No Man's Land and there's no-one there to help you.

The effort involved in changing the admin department's email address is small compared to the ongoing maintenance issues you face with changing the server OS to something uniquely yours.

Cheers
Ian :-)
___________________
Sydney, NSW, Australia

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Rename admin account
« Reply #5 on: March 29, 2014, 10:55:10 PM »
CmdLine

The admin name is hard coded & not likely to ever change in sme server for the forseeable future, it has been that way since inception of sme server back in 1999 or so. If you lodge a new feature request (NFR), which is a good idea to do, then even if someone starts work on it now, the feature will not get into sme server until at least v9.1, which is probably a year or more away (minimally & if the NFR is adopted).

You could use procmail or mailsorting (contrib) etc to filter the admin mail, so that system messages get forwarded to another user, say sysadmin@mydomain.

If external incoming admin@ mail is the main concern, you could configure external DNS/zone records to forward admin@mydomain to another email address.

Quote
....but that's a temporary solution and the new virtual domain user receives system email. I was hoping somebody had a perminent solution to this problem.

Why do you feel that is a temporary solution ? The situation described was a temporary one until they stopped using the admin mail account, but it does not make the fix a temporary one.

You can permanently give your sme server a new main domain name of abc.dyndns.org or mydomain2.com (or whatever valid domain name you prefer), then create a virtual domain in the Domains panel, for your current main domain name, say mydomain.com
Then create the pseudonym admin@mydomain.com which forwards to whichever normal user currently receives the businesses administrative type admin mail.

System/root mail etc will automatically go to admin@abc.dyndns.org (or whichever domain you select as the main server domain), & can then be forwarded "as usual" to the sysadmin user via the User panel in server manager.

All other email messages will go to the normal users, as they are valid users for the main domain & the virtual domain.

Ultimately the best option will be to discontinue the use of admin for business adminstrative mail, as sme server is not likely to change in the immediate & forseeable future.

You could offer to pay someone to rewrite the code to make the system mail account configurable, & hopefully someone would be willing to do the coding. That's how many new features have made their way into sme code, by corporate sponsorship.
« Last Edit: March 29, 2014, 11:31:13 PM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Rename admin account
« Reply #6 on: March 29, 2014, 11:28:55 PM »
CmdLine

Quote
....the new virtual domain user receives system email.

That is an incorrect statement.

"Users" associated with any virtual domain email address, can be managed with pseudonyms.

The pseudonym admin@newvirtualdomain will only receive mail specifically sent to that address (which in your case would be the currently used admin@ourdomain), & then delivered to the nominated end user account as per the pseudonym setting.

System admin (root) mail will NOT be delivered there.
Only the main sme server domain (as configured in admin console) admin user, will receive system mail (eg mail for root & system messages etc).
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline CmdLn

  • ***
  • 57
  • +0/-0
Re: Rename admin account
« Reply #7 on: April 02, 2014, 09:48:04 AM »
Thanks Janet, I am going to try the mailsorting contrib. I did have a go at using procmail before posting here but my .procmail entries were ignored so I assumed procmail is not in use?

idp_qbn: I would love to just change the admin email address to administration but my employer does not agree.


Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Rename admin account
« Reply #8 on: April 02, 2014, 10:01:08 AM »
Thanks Janet, I am going to try the mailsorting contrib.

just a question: why?

the solution you've been given doesn't need it

Offline CmdLn

  • ***
  • 57
  • +0/-0
Re: Rename admin account
« Reply #9 on: April 02, 2014, 01:22:17 PM »
1. I dont want to run the server as temporary / free second domain name. I believe this domain name will filter through to all other SME modules and show externally or even distribute internally the "fake" domain name.

2. The server is now live since 29 March and has processed 60,000 messages since. Installing a new server, as the post suggests seems more risky to me than installing a new contribution to filter admin mail.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Rename admin account
« Reply #10 on: April 02, 2014, 01:50:25 PM »
doh.. I think you missed the point..

let's say your domain is yourdomain.net and your SME uses it as primary domain

- reconfigure your server to have yourdomain.local as primary domain: nothing, not a single bit will be lost
- add a new domain: yourdomain.net
- add a new user, let's say mydomainuseradmin
- ad a new pseudonymn for mydomainuseradmin with email admin@yourdomain.net

you're done.. everything is still in place, you have what you are asking for..

Offline CmdLn

  • ***
  • 57
  • +0/-0
Re: Rename admin account
« Reply #11 on: April 03, 2014, 07:50:55 AM »
Ok you guys were right. I didnt think of having a .local or .private as the primary domain. "doh"

I tested this on a VM and the messages are routed as expected. I will make this change to our live server tonight when the traffic flow is lower.

Offline idp_qbn

  • *****
  • 347
  • +0/-0
Re: Rename admin account
« Reply #12 on: April 03, 2014, 10:39:59 AM »
Stefano - that solution was just so-o-o simple.

Now that I see what you suggested and how it works, it seems obvious. But like many things in life, what should seem obvious often is not.

Well done.

Cheers
Ian :smile:
___________________
Sydney, NSW, Australia

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Rename admin account
« Reply #13 on: April 03, 2014, 10:44:38 AM »

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Rename admin account
« Reply #14 on: April 03, 2014, 04:35:27 PM »
Ian, stefano, please could you add this in the faq or in the relevant email wiki page...this has to be written.

Many thanks
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!