Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rb:linuxloginscripts [09/01/2015 12:05]
andrew [To Do]
rb:linuxloginscripts [20/06/2017 17:08] (current)
Line 63: Line 63:
   %networklogin ​ ALL = (root) NOPASSWD: NETWORKLOGIN   %networklogin ​ ALL = (root) NOPASSWD: NETWORKLOGIN
   ​   ​
-  ​andrew ​ALL = (root) NOPASSWD: NETWORKLOGIN+  ​user ALL = (root) NOPASSWD: NETWORKLOGIN
   ​   ​
   ## NetworkLogin users   ## NetworkLogin users
Line 70: Line 70:
   #get uid and gid of user   #get uid and gid of user
   #example   #example
-  #uid=501(andrew) gid=501(andrew) groups=501(andrew),​505(ww-noc),​999(networklogin)+  #uid=501(user) gid=501(user) groups=501(user),​505(ww-noc),​999(networklogin)
   #UID is set as an env variable and cannot be reset, GID is not, so needs to be set.   #UID is set as an env variable and cannot be reset, GID is not, so needs to be set.
   GID=`id -g`   GID=`id -g`
Line 142: Line 142:
   [user@cube   [user@cube
  
-Using getent for user passwd and groups is better than cat'​ting ​the passwd and group files, getent will take account of any LDAP authentication in use.+Using getent for user passwd and groups is better than grep-ing ​the passwd and group files, getent will take account of any LDAP authentication in use.
  
  
-Finding out the OS version:-+===== Finding out the OS version:​- ​=====
  
-  ​iMac:​playground ​astringer$ echo $OSTYPE+==== Apple Mac ==== 
 + 
 +  ​iMac:​playground ​auser$ echo $OSTYPE
   darwin10.0   darwin10.0
  
-  root@andrewtest:/​etc#​ echo $OSTYPE +==== Ubuntu  ​====
-  linux-gnu +
-  root@andrewtest:/​etc#​ uname -a +
-  #70-Ubuntu ​SMP x86_64 GNU/Linux +
-  root@andrewtest:/​etc#​ cat /​etc/​debian_version  +
-  wheezy/sid+
  
 +12.04
  
-  root@fmc-enf-nctl-1:~# cat /​etc/​os-release ​+  root@usertest:/​etc#​ echo $OSTYPE 
 +  linux-gnu 
 +  root@usertest:/​etc#​ uname -
 +  Linux usertest 3.8.0-29-generic #​42~precise1-Ubuntu  
 +  root@usertest:/​etc#​ cat /​etc/​debian_version  
 +  wheezy/​sid 
 +   
 +  root@usertest:~# cat /​etc/​os-release ​
   NAME="​Ubuntu"​   NAME="​Ubuntu"​
   VERSION="​12.04.3 LTS, Precise Pangolin"​   VERSION="​12.04.3 LTS, Precise Pangolin"​
Line 165: Line 170:
   PRETTY_NAME="​Ubuntu precise (12.04.3 LTS)"   PRETTY_NAME="​Ubuntu precise (12.04.3 LTS)"
   VERSION_ID="​12.04"​   VERSION_ID="​12.04"​
-  root@fmc-enf-nctl-1:~#+  root@usertest:​~#​ 
 + 
 + 
 +14.04 
 + 
 +  admin@sys01:​~/​$ echo $OSTYPE 
 +  linux-gnu 
 +  admin@sys01:​~/​$  
 +  admin@sys01:​~/​$ uname -
 +  Linux sys01 3.13.0-62-generic #102-Ubuntu SMP Tue Aug 11 14:29:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux 
 +  admin@sys01:~/$ 
 +  admin@sys01:​~/​$ cat /​etc/​debian_version 
 +  jessie/​sid 
 +  admin@sys01:​~/​$ 
 +   
 +  fmadmin@mon01:​~/​hlsingestcheck$ cat /​etc/​os-release 
 +  NAME="​Ubuntu"​ 
 +  VERSION="​14.04.5 LTS, Trusty Tahr"​ 
 +  ID=ubuntu 
 +  ID_LIKE=debian 
 +  PRETTY_NAME="​Ubuntu 14.04.5 LTS" 
 +  VERSION_ID="​14.04"​ 
 +  HOME_URL="​http://​www.ubuntu.com/"​ 
 +  SUPPORT_URL="​http://​help.ubuntu.com/"​ 
 +  BUG_REPORT_URL="​http://​bugs.launchpad.net/​ubuntu/"​ 
 +  admin@sys01:​~/​$  
 + 
 + 
 +16.04 
 + 
 +  root@monit:/​echo $OSTYPE 
 +  linux-gnu 
 +  root@monit:/#​ uname -a 
 +  Linux monit 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux 
 +  root@monit:/#​  
 +  root@monit:/#​ cat /​etc/​debian_version 
 +  stretch/​sid 
 +  root@monit:/#​ cat /​etc/​os-release 
 +  NAME="​Ubuntu"​ 
 +  VERSION="​16.04.2 LTS (Xenial Xerus)"​ 
 +  ID=ubuntu 
 +  ID_LIKE=debian 
 +  PRETTY_NAME="​Ubuntu 16.04.2 LTS" 
 +  VERSION_ID="​16.04"​ 
 +  HOME_URL="​http://​www.ubuntu.com/"​ 
 +  SUPPORT_URL="​http://​help.ubuntu.com/"​ 
 +  BUG_REPORT_URL="​http://​bugs.launchpad.net/​ubuntu/"​ 
 +  VERSION_CODENAME=xenial 
 +  UBUNTU_CODENAME=xenial 
 +  root@monit:/#​ 
 + 
 + 
 +==== Fedora ==== 
 + 
 +  [user@eb8470w ~]$ echo $OSTYPE 
 +  linux-gnu 
 +  [user@eb8470w ~]$ uname -a 
 +  Linux eb8470w.domain.int 3.14.27-100.fc19.x86_64 #1 SMP Wed Dec 17 19:36:34 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 
 +  [user@eb8470w ~]$ cat /​etc/​fedora-release ​                                                                                                           
 +  Fedora release 19 (Schrödinger’s Cat)                                                                                                                     
 +  [user@eb8470w ~]$  
 +  [user@eb8470w ~]$ cat /​etc/​os-release 
 +  NAME=Fedora 
 +  VERSION="​19 (Schrödinger’s Cat)"​ 
 +  ID=fedora 
 +  VERSION_ID=19 
 +  PRETTY_NAME="​Fedora 19 (Schrödinger’s Cat)"​ 
 +  ANSI_COLOR="​0;​34"​ 
 +  CPE_NAME="​cpe:/​o:​fedoraproject:​fedora:​19"​ 
 +  HOME_URL="​https://​fedoraproject.org/"​ 
 +  BUG_REPORT_URL="​https://​bugzilla.redhat.com/"​ 
 +  REDHAT_BUGZILLA_PRODUCT="​Fedora"​ 
 +  REDHAT_BUGZILLA_PRODUCT_VERSION=19 
 +  REDHAT_SUPPORT_PRODUCT="​Fedora"​ 
 +  REDHAT_SUPPORT_PRODUCT_VERSION=19 
 +  [user@eb8470w ~]$ 
  

rb/linuxloginscripts.txt · Last modified: 20/06/2017 17:08 (external edit)