Skip to content
Snippets Groups Projects
Commit d7f02115 authored by Quang tru HUYNH's avatar Quang tru HUYNH
Browse files

tru: useradd + keys

parent de5b0888
Branches
Tags 3.1
No related merge requests found
#!/bin/sh
# curl https://gitlab.pasteur.fr/bruker/centos7/raw/master/ks/c7-add-tru.sh | sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH
/sbin/useradd -u 2765 -g users -G wheel -m tru
(cd ~tru && /bin/curl https://gitlab.pasteur.fr/bruker/centos7/raw/master/ks/tru/c7-kickstart-minimal.tgz| tar xzvf -)
/bin/chown -R tru:users ~tru
/bin/chmod 700 ~tru
/sbin/restorecon -Rv ~tru
# sudoers
echo 'tru ALL = NOPASSWD: ALL' >> /etc/sudoers
echo coucou | /usr/bin/passwd --stdin tru
# fix selinux permissions
/sbin/restorecon -rv /home/tru /etc/sudoers
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment