Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useradd[13618]: failed adding user 'scylla', exit code: 9 #1958

Closed
amoskong opened this issue Dec 22, 2016 · 4 comments
Closed

useradd[13618]: failed adding user 'scylla', exit code: 9 #1958

amoskong opened this issue Dec 22, 2016 · 4 comments

Comments

@amoskong
Copy link
Contributor

Installation details
Scylla version (or git commit hash): scylla-1.5.0-20161221.654919c.el7.cen
Cluster size: 1
OS (RHEL/CentOS/Ubuntu/AWS AMI): CentOS 7.3

During the artifact test, I found an error of adding user scylla in journal log.
It's the second time to add scylla user, so returned error 9 (username already in use)

Dec 22 13:00:31 localhost.localdomain useradd[13618]: failed adding user 'scylla', exit code: 9
cat dist/redhat/scylla.spec.in 

%pre server
/usr/sbin/groupadd scylla 2> /dev/null || :
/usr/sbin/useradd -g scylla -s /sbin/nologin -r -d %{_sharedstatedir}/scylla scylla 2> /dev/null || :

@syuu1228

@amoskong
Copy link
Contributor Author

We can use getent to check if scylla group/user exists before adding.

getent group scylla || /usr/sbin/groupadd scylla 2> /dev/null || :
getent passwd scylla || /usr/sbin/useradd -g scylla -s /sbin/nologin -r -d %{_sharedstatedir}/scylla scylla 2> /dev/null || :

@avikivity
Copy link
Member

avikivity commented Dec 22, 2016 via email

@syuu1228
Copy link
Contributor

@avikivity seems like sysusers.d and systemd-sysusers only available on Fedora, but CentOS7 and Ubuntu 16.04 doesn't have it. So I suppose we cannot use it at this point.

@avikivity
Copy link
Member

Ah, it was added in 7.3.

penberg pushed a commit that referenced this issue Dec 27, 2016
Currently we get "failed adding user 'scylla'" on .rpm installation when user is already exists, we can skip it to prevent error.

Fixes #1958

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1482550075-27939-1-git-send-email-syuu@scylladb.com>
(cherry picked from commit f3e45bc)
penberg pushed a commit that referenced this issue Dec 27, 2016
Currently we get "failed adding user 'scylla'" on .rpm installation when user is already exists, we can skip it to prevent error.

Fixes #1958

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1482550075-27939-1-git-send-email-syuu@scylladb.com>
(cherry picked from commit f3e45bc)
penberg pushed a commit that referenced this issue Dec 27, 2016
Currently we get "failed adding user 'scylla'" on .rpm installation when user is already exists, we can skip it to prevent error.

Fixes #1958

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1482550075-27939-1-git-send-email-syuu@scylladb.com>
(cherry picked from commit f3e45bc)
benipeled pushed a commit to benipeled/scylla that referenced this issue May 31, 2022
…uliusz Stasiewicz

This patch fills the following columns in `system.clients` table:
* `connection_stage`
* `driver_name`
* `driver_version`
* `protocol_version`

It also improves:
* `client_type` - distinguishes cql from thrift just in case
* `username` - now it displays correct username iff `PasswordAuthenticator` is configured.

What is still missing:
* SSL params (I'll happily get some advice here)
* `hostname` - I didn't find it in tested drivers

Refs scylladb#6946

Closes scylladb#7349

* github.com:scylladb/scylla:
  transport: Update `connection_stage` in `system.clients`
  transport: Retrieve driver's name and version from STARTUP message
  transport: Notify `system.clients` about "protocol_version"
  transport: On successful authentication add `username` to system.clients

(cherry picked from commit e2a02f1)

Closes scylladb#1958

Ref scylladb#1953.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants