Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In trying to solve a problem, I discovered the --session-command argument to su, as documented here. I tried to use it on my Ubuntu 12.04 system at work, but got an 'unrecognized option' error. Sure enough, it doesn't even show up on the man page for su!

The linked manpage does say --session-command is 'discouraged' but doesn't say why.

Out of curiosity, I connected to a CentOS 6.2. server at my work, and --session-command is recognized.

Further research led me to discover that the su used by Ubuntu comes from the login package, whereas in CentOS it comes from coreutils. Ubuntu also has a coreutils package installed by default, but it doesn't contain the FSF's standard su implementation. A detailed comparison shows that coreutils from both distros contain 105 executable files, but there are several differences (most of which seem to just be the installed location of the files).

My question: Is --session-command left out of Ubuntu's (or Debian's) superuser command by design, or has Ubuntu's divergent implementation simply not caught up with FSF? If by design, what is the reasoning for the omission? Related question: Why not use all the FSF's GNU Utils, anyway?

I'm sure this is documented somewhere but google was not forthcoming, given my search criteria.

share|improve this question
2 Note the Another version of this page is provided by the shadow-utils project on the top of the page you provided in your link. Although I don't know the specific reasons. – falconer Jan 14 '14 at 21:23
Interesting, thanks. – Lambart Jan 16 '14 at 19:46

Ubuntu and Debian uses the shadow-utils package since a worthwhile (log file goes to 01 Jan 1996). The util-linux su was moved from coreutils to util-linux package recently, the version in coreutils needed to be specifically build with it (most distros didn't). Apparently the only reason is that Debian always used shadow-util own implementation instead of coreutils su.

The header you will notice a message saying that there's another man page provided by the shadow-utils package which is the same as Debian/Ubuntu uses. If you see the bottom of the man page if both Ubuntu and CentOS you will notice this too.

In summary you are reading the wrong man.

share|improve this answer
Although this doesn't answer my question, it is informative. Thanks. – Lambart Jan 16 '14 at 19:45
@EricLambart actually it answers your question and beyond, you ask "why su parameter isn't available in Ubuntu but in CentOS?" which I answer "CentOS uses another package for su which Ubuntu doesn't" – Braiam Jan 16 '14 at 19:47
I just edited in an attempt to clarify the question, but in the original (and current) text you'll see that through my own research I already understood that the two OSes use different packages to provide their respective implementations of su. And Ubuntu's su comes not from a shadow-utils package (dpkg -l shadow* shows there's no such thing), but one named login. My real question was, and is: WHY? Why does Debian/Ubuntu use a non-GNU implementation, lacking a useful feature? I suspect it is due to security concerns, but I was hoping for something more concrete. :) – Lambart Jan 16 '14 at 20:55
@EricLambart apparently, going from what this USENET list says, su from the util-linux was moved from the coreutils package to util-linux, while Debian always used shadow-util. – Braiam Jan 16 '14 at 22:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.